diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2015-09-14 23:49:19 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2015-09-14 23:49:19 +0000 |
| commit | ce0673e204454338fd2850d9c97ff8d113da1ef7 (patch) | |
| tree | 1c644c18f3e661b226da639ad9b1363a8d2456f2 /src/document.cpp | |
| parent | Add keywords (diff) | |
| download | inkscape-ce0673e204454338fd2850d9c97ff8d113da1ef7.tar.gz inkscape-ce0673e204454338fd2850d9c97ff8d113da1ef7.zip | |
Fix for 1495106 (Add a check for id before sending a modified signal)
Fixed bugs:
- https://launchpad.net/bugs/1495106
(bzr r14367)
Diffstat (limited to '')
| -rw-r--r-- | src/document.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/document.cpp b/src/document.cpp index d6a2e1b98..54e98b3e6 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -1514,7 +1514,15 @@ bool SPDocument::addResource(gchar const *key, SPObject *object) g_hash_table_insert(priv->resources, (gpointer) key, rlist); GQuark q = g_quark_from_string(key); - priv->resources_changed_signals[q].emit(); + + /*do not send signal if the object has no id (yet), + it means the object is not completely built. + (happens when pasting swatches across documents, cf bug 1495106) + [this check should be more generally presend on emit() calls since + the backtrace is unusable with crashed from this cause] + */ + if(object->getId()) + priv->resources_changed_signals[q].emit(); result = true; } |
