From 81103d822a71d0eae1c7c3468131574044dcaa5b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 17 Nov 2015 08:53:29 -0500 Subject: [PATCH] use thread private data **pointer** correctly for Stateful::ID regeneration --- libs/pbd/stateful.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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