Skip to content

Commit 3a20717

Browse files
committed
src/rufus: Prevent assertion failure if START is clicked while image_path is NULL
1 parent 073a100 commit 3a20717

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rufus.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2626,6 +2626,11 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
26262626
return (INT_PTR)TRUE;
26272627
// Just in case
26282628
boot_type = (int)ComboBox_GetCurItemData(hBootType);
2629+
// Prevent asserting if hStart somehow became enabled without an image
2630+
if ((boot_type == BT_IMAGE) && (image_path == NULL)) {
2631+
EnableControls(TRUE, FALSE);
2632+
return (INT_PTR)TRUE;
2633+
}
26292634
partition_type = (int)ComboBox_GetCurItemData(hPartitionScheme);
26302635
target_type = (int)ComboBox_GetCurItemData(hTargetSystem);
26312636
fs_type = (int)ComboBox_GetCurItemData(hFileSystem);

0 commit comments

Comments
 (0)