diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2011-03-18 20:29:06 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2011-03-18 20:29:06 +0000 |
| commit | 2de761f0c46b4f3164d0dc008320da3ad0f35316 (patch) | |
| tree | fbf8c57ade340c7e2b639adc2269e5063d90c6e4 /src/document.cpp | |
| parent | Layers. Fix for Bug #249035: Undo crash when executing extensions. (diff) | |
| download | inkscape-2de761f0c46b4f3164d0dc008320da3ad0f35316.tar.gz inkscape-2de761f0c46b4f3164d0dc008320da3ad0f35316.zip | |
D-Bus. Merging branch lp:~joakim-verona/inkscape/dbus-fixes (Bug #666986, Bug #707054 and Bug #707364).
(bzr r10114)
Diffstat (limited to 'src/document.cpp')
| -rw-r--r-- | src/document.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/document.cpp b/src/document.cpp index 2a9ad9144..67ce3e26a 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -848,7 +848,11 @@ SPObject *SPDocument::getObjectById(gchar const *id) const g_return_val_if_fail(id != NULL, NULL); GQuark idq = g_quark_from_string(id); - return (SPObject*)g_hash_table_lookup(priv->iddef, GINT_TO_POINTER(idq)); + gpointer rv = g_hash_table_lookup(priv->iddef, GINT_TO_POINTER(idq)); + if(rv != NULL) + return (SPObject*)rv; + else + return NULL; } sigc::connection SPDocument::connectIdChanged(gchar const *id, |
