void
GeneralPage::config_file_changed()
{
+ if (!_config_file) {
+ return;
+ }
+
auto config = Config::instance();
auto const new_file = _config_file->path();
if (!new_file || *new_file == config->config_read_file()) {
void
GeneralPage::cinemas_file_changed()
{
+ if (!_cinemas_file) {
+ return;
+ }
+
if (auto path = _cinemas_file->path()) {
Config::instance()->set_cinemas_file(*path);
}
checked_set(_language, lang);
- checked_set(_config_file, config->config_read_file());
- checked_set(_cinemas_file, config->cinemas_file());
+ if (_config_file) {
+ checked_set(_config_file, config->config_read_file());
+ }
+ if (_cinemas_file) {
+ checked_set(_cinemas_file, config->cinemas_file());
+ }
checked_set(_check_for_updates, config->check_for_updates());
checked_set(_check_for_test_updates, config->check_for_test_updates());
void check_for_updates_changed();
void check_for_test_updates_changed();
- CheckBox* _set_language;
- wxChoice* _language;
- FilePickerCtrl* _config_file;
- FilePickerCtrl* _cinemas_file;
- CheckBox* _check_for_updates;
- CheckBox* _check_for_test_updates;
+ CheckBox* _set_language = nullptr;
+ wxChoice* _language = nullptr;
+ FilePickerCtrl* _config_file = nullptr;
+ FilePickerCtrl* _cinemas_file = nullptr;
+ CheckBox* _check_for_updates = nullptr;
+ CheckBox* _check_for_test_updates = nullptr;
};