From 90e86d0172229411bfd42acb934b9fdf892c36f4 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Tue, 30 Jun 2015 16:03:05 -0700 Subject: [PATCH] Fixing stack allocation bug in file picker. --- src/xenia/ui/win32/win32_file_picker.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xenia/ui/win32/win32_file_picker.cc b/src/xenia/ui/win32/win32_file_picker.cc index 3f84977f0..baefbbaf5 100644 --- a/src/xenia/ui/win32/win32_file_picker.cc +++ b/src/xenia/ui/win32/win32_file_picker.cc @@ -149,7 +149,8 @@ bool Win32FilePicker::Show(void* parent_window_handle) { // Set the file types to display only. Notice that this is a 1-based array. std::vector save_types; - for (auto& extension : extensions()) { + auto extensions = this->extensions(); + for (auto& extension : extensions) { save_types.push_back({extension.first.c_str(), extension.second.c_str()}); } hr = file_dialog->SetFileTypes(static_cast(save_types.size()),