Commit 15221eba authored by Johan B. C. Engelen's avatar Johan B. C. Engelen Committed by Johan Engelen

add a check for null desktop

Fixed bugs:
  - https://launchpad.net/bugs/723446

(bzr r10082)
parent 51537a0f
......@@ -73,9 +73,13 @@ guchar luminance(guchar r, guchar g, guchar b) {
* happening...
*/
bool activeDesktopIsGrayscale() {
return (SP_ACTIVE_DESKTOP->getColorMode() == Inkscape::COLORRENDERMODE_GRAYSCALE);
if (SP_ACTIVE_DESKTOP) {
return (SP_ACTIVE_DESKTOP->getColorMode() == Inkscape::COLORRENDERMODE_GRAYSCALE);
} else {
return false;
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment