summaryrefslogtreecommitdiff
path: root/src/wx/kdm_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-10-14 12:46:15 +0100
committerCarl Hetherington <cth@carlh.net>2013-10-14 12:46:15 +0100
commitc439745bf1a1a38d0fc99ed18e2726730790973b (patch)
tree735ceb6233af308f7a23043fd6f604b84df4ebf0 /src/wx/kdm_dialog.cc
parent0cb4b0621cb7f24a1a8c39fd81984b9ef79f0d7d (diff)
Prevent crashes when coming out of the add screen dialog without giving a certificate.
Diffstat (limited to 'src/wx/kdm_dialog.cc')
-rw-r--r--src/wx/kdm_dialog.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc
index 6164f7fd9..02b91a1e2 100644
--- a/src/wx/kdm_dialog.cc
+++ b/src/wx/kdm_dialog.cc
@@ -276,7 +276,9 @@ KDMDialog::add_screen_clicked ()
shared_ptr<Cinema> c = selected_cinemas().front().second;
ScreenDialog* d = new ScreenDialog (this, "Add Screen");
- d->ShowModal ();
+ if (d->ShowModal () != wxID_OK) {
+ return;
+ }
shared_ptr<Screen> s (new Screen (d->name(), d->certificate()));
c->add_screen (s);