From: dwyip Date: Fri, 19 May 2006 03:23:53 +0000 (+0000) Subject: fixed crash when starting up without Inkscape GUI: Inkscape messages were being redir... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=edceed2c943d9d9f79377dda7b50b47e1e690246;p=inkscape.git 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 --- 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 */