summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1625d5f)
raw | patch | inline | side by side (parent: 1625d5f)
author | tweenk <tweenk@users.sourceforge.net> | |
Fri, 13 Feb 2009 22:22:06 +0000 (22:22 +0000) | ||
committer | tweenk <tweenk@users.sourceforge.net> | |
Fri, 13 Feb 2009 22:22:06 +0000 (22:22 +0000) |
src/preferences.h | patch | blob | history |
diff --git a/src/preferences.h b/src/preferences.h
index 0c37be24baba4c462ccd95ed25d567a65bf124db..e1b3136a8144ca77249aeffb2d10aa85f4c16e80 100644 (file)
--- a/src/preferences.h
+++ b/src/preferences.h
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;
/**
* 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;
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);
}