diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2009-02-13 22:22:06 +0000 |
|---|---|---|
| committer | tweenk <tweenk@users.sourceforge.net> | 2009-02-13 22:22:06 +0000 |
| commit | f8b34d4f811d9ba94a669cd81050d1b8352d0e35 (patch) | |
| tree | 59793aeb94f7fa19e200fa69a7557f459cc0ee61 /src | |
| parent | rename help-manual to help-contents (diff) | |
| download | inkscape-f8b34d4f811d9ba94a669cd81050d1b8352d0e35.tar.gz inkscape-f8b34d4f811d9ba94a669cd81050d1b8352d0e35.zip | |
Fix crashes when tool styles are not set in prefs.
(bzr r7287)
Diffstat (limited to 'src')
| -rw-r--r-- | src/preferences.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/preferences.h b/src/preferences.h index 0c37be24b..e1b3136a8 100644 --- a/src/preferences.h +++ b/src/preferences.h @@ -163,7 +163,7 @@ public: inline Glib::ustring getString() const; /** * @brief Interpret the preference as a CSS style. - * @return A CSS style that has to be unrefed when no longer necessary. + * @return A CSS style that has to be unrefed when no longer necessary. Never NULL. */ inline SPCSSAttr *getStyle() const; /** @@ -173,7 +173,7 @@ public: * This function will look up the preferences with the same entry name * in ancestor directories and return the inherited CSS style. * - * @return Inherited CSS style that has to be unrefed after use. + * @return Inherited CSS style that has to be unrefed after use. Never NULL. */ inline SPCSSAttr *getInheritedStyle() const; @@ -511,13 +511,13 @@ inline Glib::ustring Preferences::Entry::getString() const inline SPCSSAttr *Preferences::Entry::getStyle() const { - if (!this->isValid()) return NULL; + if (!this->isValid()) return sp_repr_css_attr_new(); return Inkscape::Preferences::get()->_extractStyle(*this); } inline SPCSSAttr *Preferences::Entry::getInheritedStyle() const { - if (!this->isValid()) return NULL; + if (!this->isValid()) return sp_repr_css_attr_new(); return Inkscape::Preferences::get()->_extractInheritedStyle(*this); } |
