summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-09-27 13:46:24 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-09-27 13:46:24 +0000
commit343185be57491deaca70a16d1ed1314783f78c2b (patch)
treeaa4f4e3f4bf953a36ff2434e742e290f4695c46e /src/document.cpp
parentRefactor addtoicon and turn into more generic iconrenderer CellRenderer (diff)
downloadinkscape-343185be57491deaca70a16d1ed1314783f78c2b.tar.gz
inkscape-343185be57491deaca70a16d1ed1314783f78c2b.zip
fix crash with PNG/JPG command line argument
https://bugs.launchpad.net/inkscape/+bug/1794762
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/document.cpp b/src/document.cpp
index d4094b7e9..a9a254a06 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -842,7 +842,7 @@ void SPDocument::fitToRect(Geom::Rect const &rect, bool with_margins)
}
}
- double y_dir = SP_ACTIVE_DESKTOP->yaxisdir();
+ double y_dir = SP_ACTIVE_DESKTOP ? SP_ACTIVE_DESKTOP->yaxisdir() : 1;
if (y_dir > 0) {
std::swap(margin_top, margin_bottom);