summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-12-03 09:33:34 +0000
committerCarl Hetherington <cth@carlh.net>2014-12-03 09:33:34 +0000
commit996fa2194581bf95113b9778849654893c414889 (patch)
tree7720d1d7a649e4ebc7fffe3229ff20ce68552c18
parentb1a381a4f1c80bbc57db8c393684875577ab3c94 (diff)
Hand-apply 0ca0ab9f23ac0238643a6d148148385388f71c00 from master;
potential use-after-free.
-rw-r--r--TO_PORT1
-rw-r--r--src/wx/content_panel.cc5
2 files changed, 3 insertions, 3 deletions
diff --git a/TO_PORT b/TO_PORT
index b7a52640d..b682332a8 100644
--- a/TO_PORT
+++ b/TO_PORT
@@ -1,3 +1,2 @@
-d8bfb59816e39406beb7c815e0424c480ae74e32
cd0b7dd044d5b5b1c05118a58c58458edb80bf61
d609c88438d8110569cc940ea2e1bc78c0bb5acc
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index 9a40a5074..2932ee7c5 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -258,6 +258,7 @@ ContentPanel::add_folder_clicked ()
{
wxDirDialog* d = new wxDirDialog (_panel, _("Choose a folder"), wxT (""), wxDD_DIR_MUST_EXIST);
int const r = d->ShowModal ();
+ boost::filesystem::path const path (wx_to_std (d->GetPath ()));
d->Destroy ();
if (r != wxID_OK) {
@@ -267,10 +268,10 @@ ContentPanel::add_folder_clicked ()
shared_ptr<Content> content;
try {
- content.reset (new ImageContent (_film, boost::filesystem::path (wx_to_std (d->GetPath ()))));
+ content.reset (new ImageContent (_film, path));
} catch (...) {
try {
- content.reset (new DCPContent (_film, boost::filesystem::path (wx_to_std (d->GetPath ()))));
+ content.reset (new DCPContent (_film, path));
} catch (...) {
error_dialog (_panel, _("Could not find any images nor a DCP in that folder"));
return;