diff options
| author | Liam P. White <inkscapebrony@gmail.com> | 2014-07-24 20:56:54 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebrony@gmail.com> | 2014-07-24 20:56:54 +0000 |
| commit | b4f5e57056ed7db1974fe21741fcb7c6ff7aa0c2 (patch) | |
| tree | 2a6a553fccd4c3fddd82bae251793b5418728bfa /src/inkscape.cpp | |
| parent | Fix typo in dbus api files (diff) | |
| download | inkscape-b4f5e57056ed7db1974fe21741fcb7c6ff7aa0c2.tar.gz inkscape-b4f5e57056ed7db1974fe21741fcb7c6ff7aa0c2.zip | |
Fix crash bug when exporting PNG from CLI
(bzr r13341.5.12)
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); + } } } |
