PluginClient::~PluginClient()
{
-// Delete the GUI thread. The GUI must be hidden with hide_gui first.
- delete thread;
+ if( thread ) {
+ hide_gui();
+ thread->join();
+ delete thread;
+ }
// Virtual functions don't work here.
if(defaults) delete defaults;
thread->window->set_done(0);
//printf("PluginClient::hide_gui %d thread->window=%p\n", __LINE__, thread->window);
thread->window->unlock_window();
-//printf("PluginClient::delete_thread %d\n", __LINE__);
- thread->join();
}
}