Code

fix crash on trying to autosave with no documents (e.g. when inkscape was given a...
authorbuliabyak <buliabyak@users.sourceforge.net>
Thu, 28 Aug 2008 20:45:29 +0000 (20:45 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Thu, 28 Aug 2008 20:45:29 +0000 (20:45 +0000)
src/inkscape.cpp

index 16813e46b28b19a674060b0157bec7ccd32959d5..10857e94a797f598087b6220a7610adda41308de 100644 (file)
@@ -306,6 +306,10 @@ typedef int uid_t;
  */
 static gint inkscape_autosave(gpointer)
 {
+    if (!inkscape->documents) { // nothing to autosave
+        return TRUE;
+    }
+
     // Use UID for separating autosave-documents between users if directory is multiuser
     uid_t uid = getuid();