Forward frequent parameter from Playlist::ContentChanged through Film::ContentChanged.
[dcpomatic.git] / src / wx / kdm_dialog.cc
index 6a1f8051f90955938ea817534e120e0c2dd1ffff..8f4f8622df0ca3dd93c43b7e326b2e93d97a4367 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -273,8 +273,10 @@ KDMDialog::setup_sensitivity ()
        _edit_screen->Enable (ss);
        _remove_screen->Enable (ss);
 
-       wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK));
-       ok->Enable ((selected_cinemas().size() > 0 || selected_screens().size() > 0) && sd);
+       wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK, this));
+       if (ok) {
+               ok->Enable ((selected_cinemas().size() > 0 || selected_screens().size() > 0) && sd);
+       }
 
        _folder->Enable (_write_to->GetValue ());
 }
@@ -472,7 +474,7 @@ boost::filesystem::path
 KDMDialog::cpl () const
 {
        int const item = _cpl->GetSelection ();
-       assert (item >= 0);
+       DCPOMATIC_ASSERT (item >= 0);
        return _cpls[item].cpl_file;
 }