From 32598fdd4d1e85228e46242d37f83c739591a078 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 29 Nov 2012 09:37:30 +0900 Subject: Fix for 1073128 : Command line PNG export fails if FeFlood filter primitive is present (bzr r11913) --- src/inkscape.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index fc9a9783f..fc823f8b7 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -1270,6 +1270,10 @@ inkscape_active_document (void) { if (SP_ACTIVE_DESKTOP) { return sp_desktop_document (SP_ACTIVE_DESKTOP); + } else if (!inkscape->document_set.empty()) { + // If called from the command line there will be no desktop + // So 'fall back' to take the first listed document in the Inkscape instance + return inkscape->document_set.begin()->first; } return NULL; -- cgit v1.2.3