Make sure we have a valid capture file pointer in win32_export_file().

Fixes bug 9271.

svn path=/trunk/; revision=52612
This commit is contained in:
Gerald Combs 2013-10-15 01:10:52 +00:00
parent 2b0c8b1c71
commit bc3cd5611e
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}