diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2018-09-27 15:48:12 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2018-09-27 15:50:23 +0000 |
| commit | 526e8ead4e28bd8c77c4b4b12ecdbccd29b1cf90 (patch) | |
| tree | 1971030c29796a4b1e443abe8d79d24ac87abab0 /src/helper/stock-items.cpp | |
| parent | Propagate IconRenderer's activate signal so we don't have to guess where the ... (diff) | |
| download | inkscape-526e8ead4e28bd8c77c4b4b12ecdbccd29b1cf90.tar.gz inkscape-526e8ead4e28bd8c77c4b4b12ecdbccd29b1cf90.zip | |
SP_ACTIVE_DESKTOP: check for NULL or eliminate
Diffstat (limited to 'src/helper/stock-items.cpp')
| -rw-r--r-- | src/helper/stock-items.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/helper/stock-items.cpp b/src/helper/stock-items.cpp index 75dd957c5..23259ec64 100644 --- a/src/helper/stock-items.cpp +++ b/src/helper/stock-items.cpp @@ -26,7 +26,6 @@ #include <xml/repr.h> #include "document-private.h" -#include "desktop.h" #include "inkscape.h" #include "io/sys.h" @@ -195,8 +194,7 @@ SPObject *get_stock_item(gchar const *urn, gboolean stock) gchar * base = g_strndup(e, a); - SPDesktop *desktop = SP_ACTIVE_DESKTOP; - SPDocument *doc = desktop->getDocument(); + SPDocument *doc = SP_ACTIVE_DOCUMENT; SPDefs *defs = doc->getDefs(); if (!defs) { g_free(base); @@ -265,8 +263,7 @@ SPObject *get_stock_item(gchar const *urn, gboolean stock) else { - SPDesktop *desktop = SP_ACTIVE_DESKTOP; - SPDocument *doc = desktop->getDocument(); + SPDocument *doc = SP_ACTIVE_DOCUMENT; SPObject *object = doc->getObjectById(urn); return object; |
