From 343185be57491deaca70a16d1ed1314783f78c2b Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Thu, 27 Sep 2018 15:46:24 +0200 Subject: fix crash with PNG/JPG command line argument https://bugs.launchpad.net/inkscape/+bug/1794762 --- src/document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/document.cpp') 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); -- cgit v1.2.3