diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2011-03-07 19:47:04 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2011-03-07 19:47:04 +0000 |
| commit | 15221eba482d2f0a57770b2bfb0926ca1869c4c6 (patch) | |
| tree | 39107fa2764b6a5e14b0fe183f4e3ee95aa674d3 /src/display/grayscale.cpp | |
| parent | Allow the center handle to be selectable for items having a width or height c... (diff) | |
| download | inkscape-15221eba482d2f0a57770b2bfb0926ca1869c4c6.tar.gz inkscape-15221eba482d2f0a57770b2bfb0926ca1869c4c6.zip | |
add a check for null desktop
Fixed bugs:
- https://launchpad.net/bugs/723446
(bzr r10082)
Diffstat (limited to 'src/display/grayscale.cpp')
| -rw-r--r-- | src/display/grayscale.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/display/grayscale.cpp b/src/display/grayscale.cpp index af3a781b0..37f2b255c 100644 --- a/src/display/grayscale.cpp +++ b/src/display/grayscale.cpp @@ -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; + } } - + }; |
