From 33dc722235c12777bede5e6f795cf17063b30f84 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 4 Feb 2011 12:43:26 +0000 Subject: ensure that Gtkmm2ext::UI's requests always get their type field initialized, since they are now deleted without necessarily having been used git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@8699 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/gtkmm2ext/gtk_ui.cc | 1 + libs/gtkmm2ext/gtkmm2ext/gtk_ui.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index 25501a2119..291740c15b 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -52,6 +52,7 @@ using std::map; pthread_t UI::gui_thread; UI *UI::theGtkUI = 0; +BaseUI::RequestType Gtkmm2ext::NullRequest = BaseUI::new_request_type(); BaseUI::RequestType Gtkmm2ext::ErrorMessage = BaseUI::new_request_type(); BaseUI::RequestType Gtkmm2ext::Quit = BaseUI::new_request_type(); BaseUI::RequestType Gtkmm2ext::TouchDisplay = BaseUI::new_request_type(); diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index 4d4d7181ed..c3352f672b 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -51,6 +51,7 @@ namespace Gtkmm2ext { class TextViewer; +extern BaseUI::RequestType NullRequest; extern BaseUI::RequestType ErrorMessage; extern BaseUI::RequestType Quit; extern BaseUI::RequestType CallSlot; @@ -77,6 +78,10 @@ struct UIRequest : public BaseUI::BaseRequestObject { void *arg; const char *msg2; sigc::slot slot; + + UIRequest () { + type = NullRequest; + } ~UIRequest () { if (type == ErrorMessage && msg) { -- cgit v1.2.3