projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9849215
)
Don't destroy wxFileDialog before reading from it.
author
Carl Hetherington
<cth@carlh.net>
Tue, 26 Nov 2013 00:11:54 +0000
(
00:11
+0000)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 26 Nov 2013 00:11:54 +0000
(
00:11
+0000)
src/wx/film_editor.cc
patch
|
blob
|
history
diff --git
a/src/wx/film_editor.cc
b/src/wx/film_editor.cc
index b3b5242b2c4400653c3058ff455e4469b920e1de..6a2aea18d0655d6cc36f163b09e238a0adf10b25 100644
(file)
--- a/
src/wx/film_editor.cc
+++ b/
src/wx/film_editor.cc
@@
-733,9
+733,9
@@
FilmEditor::content_add_file_clicked ()
{
wxFileDialog* d = new wxFileDialog (this, _("Choose a file or files"), wxT (""), wxT (""), wxT ("*.*"), wxFD_MULTIPLE);
int const r = d->ShowModal ();
- d->Destroy ();
if (r != wxID_OK) {
+ d->Destroy ();
return;
}
@@
-747,6
+747,8
@@
FilmEditor::content_add_file_clicked ()
for (unsigned int i = 0; i < paths.GetCount(); ++i) {
_film->examine_and_add_content (content_factory (_film, wx_to_std (d->GetPath ())));
}
+
+ d->Destroy ();
}
void