diff --git a/libs/pbd/stateful.cc b/libs/pbd/stateful.cc index ac36a69127..a5b583cc4d 100644 --- a/libs/pbd/stateful.cc +++ b/libs/pbd/stateful.cc @@ -44,9 +44,7 @@ namespace PBD { int Stateful::current_state_version = 0; int Stateful::loading_state_version = 0; -static void do_not_delete (void*) {} - -Glib::Threads::Private Stateful::regenerate_xml_or_string_ids (do_not_delete); +Glib::Threads::Private Stateful::regenerate_xml_or_string_ids; Stateful::Stateful () : _extra_xml (0) @@ -421,7 +419,8 @@ Stateful::set_id (const string& str) void Stateful::set_regenerate_xml_and_string_ids_in_this_thread (bool yn) { - regenerate_xml_or_string_ids.set (&yn); + bool* val = new bool (yn); + regenerate_xml_or_string_ids.set (val); } } // namespace PBD