X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdesktop-style.cpp;h=c8782051bef6772088cef4d5b985488a00f16381;hb=dbc38c8d223488aae167dcccebcdd17c49662f0d;hp=edb925135b3169f97079d08a3be358a3a5199abc;hpb=f8663560deb57dfd332026dbc1f25ae8b9904863;p=inkscape.git diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp index edb925135..c8782051b 100644 --- a/src/desktop-style.cpp +++ b/src/desktop-style.cpp @@ -344,7 +344,7 @@ sp_desktop_apply_style_tool(SPDesktop *desktop, Inkscape::XML::Node *repr, Glib: if (prefs->getBool(tool_path + "/usecurrent") && css_current) { sp_repr_css_set(repr, css_current, "style"); } else { - SPCSSAttr *css = prefs->getStyle(tool_path + "/style"); + SPCSSAttr *css = prefs->getInheritedStyle(tool_path + "/style"); sp_repr_css_set(repr, css, "style"); sp_repr_css_attr_unref(css); } @@ -1324,7 +1324,11 @@ sp_desktop_query_style(SPDesktop *desktop, SPStyle *style, int property) 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; } /**