diff options
Diffstat (limited to 'src/inkscape.cpp')
| -rw-r--r-- | src/inkscape.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/inkscape.cpp b/src/inkscape.cpp index cca6918e2..94c3722cb 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -1165,10 +1165,12 @@ Inkscape::ActionContext Application::action_context_for_document(SPDocument *doc) { // If there are desktops, check them first to see if the document is bound to one of them - for (std::vector<SPDesktop*>::iterator iter = _desktops->begin(), e = _desktops->end() ; iter != e ; ++iter) { - SPDesktop *desktop = *iter; - if (desktop->doc() == doc) { - return Inkscape::ActionContext(desktop); + if (_desktops != NULL) { + for (std::vector<SPDesktop*>::iterator iter = _desktops->begin(), e = _desktops->end() ; iter != e ; ++iter) { + SPDesktop *desktop = *iter; + if (desktop->doc() == doc) { + return Inkscape::ActionContext(desktop); + } } } |
