Code

fixed crash when starting up without Inkscape GUI: Inkscape messages were being redir...
authordwyip <dwyip@users.sourceforge.net>
Fri, 19 May 2006 03:23:53 +0000 (03:23 +0000)
committerdwyip <dwyip@users.sourceforge.net>
Fri, 19 May 2006 03:23:53 +0000 (03:23 +0000)
to DebugDialog regardless of value of use_gui, which caused problems in DebugDialog
instantiation

src/inkscape.cpp

index 4051a453cb829495a56fe235af3c09788ac7bbe0..b1fbdb28dbd66335634da4e624005c1b7c300c98 100644 (file)
@@ -561,16 +561,18 @@ inkscape_application_init (const gchar *argv0, gboolean use_gui)
     Inkscape::Preferences::load();
     inkscape_load_menus(inkscape);
 
-    /* DebugDialog redirection.  On Linux, default to OFF, on Win32, default to ON */
+    /* DebugDialog redirection.  On Linux, default to OFF, on Win32, default to ON.
+        * Use only if use_gui is enabled 
+        */
 #ifdef WIN32
 #define DEFAULT_LOG_REDIRECT true
 #else
 #define DEFAULT_LOG_REDIRECT false
 #endif
 
-    if (prefs_get_int_attribute("dialogs.debug", "redirect", DEFAULT_LOG_REDIRECT))
+    if (use_gui == TRUE && prefs_get_int_attribute("dialogs.debug", "redirect", DEFAULT_LOG_REDIRECT))
     {
-        Inkscape::UI::Dialogs::DebugDialog::getInstance()->captureLogMessages();
+               Inkscape::UI::Dialogs::DebugDialog::getInstance()->captureLogMessages();
     }
 
     /* Initialize the extensions */