use thread private data **pointer** correctly for Stateful::ID regeneration

This commit is contained in:
Paul Davis 2015-11-17 08:53:29 -05:00
parent d2cba4d7ac
commit 81103d822a
1 changed files with 3 additions and 4 deletions

View File

@ -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<bool> Stateful::regenerate_xml_or_string_ids (do_not_delete);
Glib::Threads::Private<bool> 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