Fix crash when trying to load non-existant analyses with the window hidden.
authorCarl Hetherington <cth@carlh.net>
Fri, 25 Oct 2013 15:08:50 +0000 (16:08 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 25 Oct 2013 15:08:50 +0000 (16:08 +0100)
src/wx/audio_dialog.cc

index c7a0815f821ba341aae418a7d6f2067072f95ae9..b7c244c9c51341d8c3625004e4f9ac6df45b1d89 100644 (file)
@@ -101,7 +101,11 @@ AudioDialog::set_content (shared_ptr<AudioContent> c)
 void
 AudioDialog::try_to_load_analysis ()
 {
-       if (!boost::filesystem::exists (_content->audio_analysis_path()) && IsShown ()) {
+       if (!IsShown ()) {
+               return;
+       }
+       
+       if (!boost::filesystem::exists (_content->audio_analysis_path())) {
                _content->analyse_audio (bind (&AudioDialog::analysis_finished, this));
                return;
        }