diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-10 22:45:56 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-10 22:45:56 +0000 |
commit | 877c3f37c4ee7d4aa7ca34936f25f3eb0c7787ed (patch) | |
tree | 90c0e65231ec65f8ddf9664a8fef6b9988262ca6 /libs | |
parent | 4302649bd92c9093ea8da4dcc3b50fdf85c6a13d (diff) |
stop crash if an error message is generated before the style RC file is loaded
git-svn-id: svn://localhost/ardour2/branches/3.0@12248 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/gtk_ui.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index 92756c4782..3ec752af02 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -565,10 +565,15 @@ UI::process_error_message (Transmitter::Channel chn, const char *str) handle_fatal (str); } else { - display_message (prefix, prefix_len, ptag, mtag, str); - - if (!errors->is_visible() && chn != Transmitter::Info) { - show_errors (); + if (!ptag || !mtag) { + /* oops, message sent before we set up tags - don't crash */ + cerr << prefix << str << endl; + } else { + display_message (prefix, prefix_len, ptag, mtag, str); + + if (!errors->is_visible() && chn != Transmitter::Info) { + show_errors (); + } } } |