Skip to content

Commit

Permalink
Don't segfault if we get a bad database name for some reason that yie…
Browse files Browse the repository at this point in the history
…lds an invalid temp filename
  • Loading branch information
smowton committed Feb 8, 2016
1 parent 0c675c0 commit 14f436e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/winmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,10 @@ enum INCREDIMAIL_VERSION incredimail_version;
SendDlgItemMessage( global_hwnd, IDC_PROGRESS2, PBM_SETPOS, 0, 0 );

inputfile = CreateFile(temp_file_listing, GENERIC_READ, 0x0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
if (inputfile == INVALID_HANDLE_VALUE) {
MessageBox(global_hwnd, "Can't open temporary file", "Error!", MB_OK);
return;
}

do {
ZeroMemory( im_database_filename, sizeof( im_database_filename ) );
Expand Down

0 comments on commit 14f436e

Please sign in to comment.