summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-05-10 22:45:56 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-05-10 22:45:56 +0000
commit877c3f37c4ee7d4aa7ca34936f25f3eb0c7787ed (patch)
tree90c0e65231ec65f8ddf9664a8fef6b9988262ca6 /libs
parent4302649bd92c9093ea8da4dcc3b50fdf85c6a13d (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.cc13
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 ();
+ }
}
}