}
catch (exception& e)
{
- if (_splash) {
- _splash->Destroy ();
- _splash = nullptr;
- }
+ _splash.reset();
error_dialog (nullptr, wxString::Format ("DCP-o-matic could not start."), std_to_wx(e.what()));
}
void close_splash ()
{
- if (_splash) {
- _splash->Destroy ();
- _splash = nullptr;
- }
+ _splash.reset();
}
void config_failed_to_load (Config::LoadFailure what)
/* Destroy the splash screen here, as otherwise bad things seem to happen (for reasons unknown)
when we open our recreate dialog, close it, *then* try to Destroy the splash (the Destroy fails).
*/
- _splash->Destroy ();
- _splash = nullptr;
+ _splash.reset();
auto config = Config::instance();
switch (reason) {
}
DOMFrame* _frame = nullptr;
- wxSplashScreen* _splash = nullptr;
+ wx_ptr<wxSplashScreen> _splash;
shared_ptr<wxTimer> _timer;
string _film_to_load;
string _film_to_create;