diff options
author | Peter Kohaut | 2017-03-20 00:30:41 +0100 |
---|---|---|
committer | Peter Kohaut | 2017-03-20 00:30:41 +0100 |
commit | 02185fbcf52a406fb6a381ccfdfdd46077c24127 (patch) | |
tree | c29431a4344664c27862d43967d1c9e9f3627ea6 /gui/launcher.cpp | |
parent | 25e5143f99dab91d53eb52de703ef1b4c9ee2656 (diff) | |
parent | 89d5eeaa5819c10266160fd1bf12f88f6e073a12 (diff) | |
download | scummvm-rg350-02185fbcf52a406fb6a381ccfdfdd46077c24127.tar.gz scummvm-rg350-02185fbcf52a406fb6a381ccfdfdd46077c24127.tar.bz2 scummvm-rg350-02185fbcf52a406fb6a381ccfdfdd46077c24127.zip |
Merge branch 'master' of https://github.com/scummvm/scummvm
Diffstat (limited to 'gui/launcher.cpp')
-rw-r--r-- | gui/launcher.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp index f96dd17d46..f60fecf509 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -204,7 +204,10 @@ void LauncherDialog::clean() { while (_firstWidget) { Widget* w = _firstWidget; removeWidget(w); - delete w; + // This is called from rebuild() which may result from handleCommand being called by + // a child widget sendCommand call. In such a case sendCommand is still being executed + // so we should not delete yet the child widget. Thus delay the deletion. + g_gui.addToTrash(w, this); } delete _browser; delete _loadDialog; |