summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-07-02 23:51:55 +0200
committerCarl Hetherington <cth@carlh.net>2023-07-02 23:51:55 +0200
commit612507550b58d15a5e1eccba4ff84a1cd126d068 (patch)
tree5bba86a19511f016fa926ce5a935e78d6cc9348e
parentfc10e39ac88ee16a711d1d643f863e84dcd8157d (diff)
Fix crash if an exception is thrown before the splash screen is created.
-rw-r--r--src/tools/dcpomatic.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index fc568d737..b53f39b45 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -1821,8 +1821,10 @@ private:
void close_splash ()
{
- _splash->Destroy();
- _splash = nullptr;
+ if (_splash) {
+ _splash->Destroy();
+ _splash = nullptr;
+ }
}
void config_failed_to_load (Config::LoadFailure what)
@@ -1909,7 +1911,7 @@ private:
}
DOMFrame* _frame = nullptr;
- wxSplashScreen* _splash;
+ wxSplashScreen* _splash = nullptr;
shared_ptr<wxTimer> _timer;
string _film_to_load;
string _film_to_create;