summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 24b73e1)
raw | patch | inline | side by side (parent: 24b73e1)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Sat, 6 Jun 2009 22:12:17 +0000 (22:12 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Sat, 6 Jun 2009 22:12:17 +0000 (22:12 +0000) |
src/desktop-style.cpp | patch | blob | history | |
src/gradient-context.cpp | patch | blob | history |
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp
index edb925135b3169f97079d08a3be358a3a5199abc..d5144e9f02864221af25f972350b344f754cdfad 100644 (file)
--- a/src/desktop-style.cpp
+++ b/src/desktop-style.cpp
return ret; // subselection returned a style, pass it on
// otherwise, do querying and averaging over selection
- return sp_desktop_query_style_from_list ((GSList *) desktop->selection->itemList(), style, property);
+ if (desktop->selection != NULL) {
+ return sp_desktop_query_style_from_list ((GSList *) desktop->selection->itemList(), style, property);
+ }
+
+ return QUERY_STYLE_NOTHING;
}
/**
index 643b63f794dcf90f5ca7603bc97fd04a6b440269..b4eeda2905dde99800d7be3e2f392454fc372758 100644 (file)
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
GrDrag *drag = rc->_grdrag;
Inkscape::Selection *selection = sp_desktop_selection(SP_EVENT_CONTEXT(rc)->desktop);
+ if (selection == NULL) {
+ return;
+ }
guint n_obj = g_slist_length((GSList *) selection->itemList());
if (!drag->isNonEmpty() || selection->isEmpty())