13
0
livetrax/libs/pbd/ui_callback.cc
Paul Davis b1a7fd9366 avoid double delete of UI objects caused by default behaviour of Glib::Private
git-svn-id: svn://localhost/ardour2/branches/3.0@6341 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-10 20:50:12 +00:00

20 lines
349 B
C++

#include "pbd/ui_callback.h"
using namespace PBD;
Glib::StaticPrivate<UICallback> UICallback::thread_ui;
static void do_not_delete_the_ui_pointer (void*) { }
UICallback*
UICallback::get_ui_for_thread() {
return thread_ui.get ();
}
void
UICallback::set_ui_for_thread (UICallback* ui)
{
thread_ui.set (ui, do_not_delete_the_ui_pointer);
}