projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4956be4
)
Try to fix crash on exit with the preferences dialog open (only appears on OS X).
author
Carl Hetherington
<cth@carlh.net>
Sun, 7 Sep 2014 22:20:19 +0000
(23:20 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 7 Sep 2014 22:20:19 +0000
(23:20 +0100)
src/tools/dcpomatic.cc
patch
|
blob
|
history
diff --git
a/src/tools/dcpomatic.cc
b/src/tools/dcpomatic.cc
index 6b7ad027303392c638fffc043916150ef2b266d8..c3dd8cd582231739f4b158bd63b24effa458ef66 100644
(file)
--- a/
src/tools/dcpomatic.cc
+++ b/
src/tools/dcpomatic.cc
@@
-163,7
+163,7
@@
public:
setup_menu (bar);
SetMenuBar (bar);
setup_menu (bar);
SetMenuBar (bar);
- Config::instance()->Changed.connect (boost::bind (&Frame::config_changed, this));
+
_config_changed_connection =
Config::instance()->Changed.connect (boost::bind (&Frame::config_changed, this));
config_changed ();
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_new, this), ID_file_new);
config_changed ();
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_new, this), ID_file_new);
@@
-515,8
+515,13
@@
private:
return;
}
return;
}
+ /* We don't want to hear about any more configuration changes, since they
+ cause the File menu to be altered, which itself will be deleted around
+ now (without, as far as I can see, any way for us to find out).
+ */
+ _config_changed_connection.disconnect ();
+
maybe_save_then_delete_film ();
maybe_save_then_delete_film ();
-
ev.Skip ();
}
ev.Skip ();
}
@@
-684,6
+689,7
@@
private:
int _history_items;
int _history_position;
wxMenuItem* _history_separator;
int _history_items;
int _history_position;
wxMenuItem* _history_separator;
+ boost::signals2::scoped_connection _config_changed_connection;
};
static const wxCmdLineEntryDesc command_line_description[] = {
};
static const wxCmdLineEntryDesc command_line_description[] = {