From edceed2c943d9d9f79377dda7b50b47e1e690246 Mon Sep 17 00:00:00 2001 From: dwyip Date: Fri, 19 May 2006 03:23:53 +0000 Subject: [PATCH] fixed crash when starting up without Inkscape GUI: Inkscape messages were being redirected to DebugDialog regardless of value of use_gui, which caused problems in DebugDialog instantiation --- src/inkscape.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 4051a453c..b1fbdb28d 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -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 */ -- 2.30.2