From bc3cd5611e4c0c742aa0c940a6daaf891f614818 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 15 Oct 2013 01:10:52 +0000 Subject: [PATCH] Make sure we have a valid capture file pointer in win32_export_file(). Fixes bug 9271. svn path=/trunk/; revision=52612 --- ui/win32/file_dlg_win32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c index c31193f809..b2d8d29128 100644 --- a/ui/win32/file_dlg_win32.c +++ b/ui/win32/file_dlg_win32.c @@ -614,6 +614,8 @@ win32_export_file(HWND h_wnd, capture_file *cf, export_type_e export_type) { OSVERSIONINFO osvi; #endif + g_cf = cf; + /* see OPENFILENAME comment in win32_open_file */ #if (_MSC_VER >= 1500) SecureZeroMemory(&osvi, sizeof(OSVERSIONINFO)); @@ -714,6 +716,7 @@ win32_export_file(HWND h_wnd, capture_file *cf, export_type_e export_type) { set_last_open_dir(dirname); } + g_cf = NULL; g_free( (void *) ofn); }