diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-07-02 23:51:55 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-07-02 23:51:55 +0200 |
| commit | 612507550b58d15a5e1eccba4ff84a1cd126d068 (patch) | |
| tree | 5bba86a19511f016fa926ce5a935e78d6cc9348e | |
| parent | fc10e39ac88ee16a711d1d643f863e84dcd8157d (diff) | |
Fix crash if an exception is thrown before the splash screen is created.
| -rw-r--r-- | src/tools/dcpomatic.cc | 8 |
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; |
