summaryrefslogtreecommitdiffstats
path: root/src/inkscape.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-12-04 09:51:15 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-12-04 09:51:15 +0000
commit2c6e21d9fd3945a73b3ed5d04a87fb16a90f7a8e (patch)
tree52a0994d8a30aaa8f867073d1cd9ce575f490de8 /src/inkscape.cpp
parentchanges_2012-11_28.patch (diff)
parentwix installer: create msi filename from version sing in src/inkscape.rc, add ... (diff)
downloadinkscape-2c6e21d9fd3945a73b3ed5d04a87fb16a90f7a8e.tar.gz
inkscape-2c6e21d9fd3945a73b3ed5d04a87fb16a90f7a8e.zip
merge from trunk (r11929)
[win32] Please update to latest devlibs for Windows (r41) (bzr r11668.1.44)
Diffstat (limited to 'src/inkscape.cpp')
-rw-r--r--src/inkscape.cpp4
1 files changed, 4 insertions, 0 deletions
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;