From 0cb43db2904115816029dbb713cf08b8e5714f0f Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 17 Mar 2018 23:57:04 +0100 Subject: [PATCH] The CD-ROM image code in win_stbar.c now malloc's prev_image_path if it's NULL. --- src/win/win_stbar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/win/win_stbar.c b/src/win/win_stbar.c index 7f078fcc1..0b50d6e39 100644 --- a/src/win/win_stbar.c +++ b/src/win/win_stbar.c @@ -8,7 +8,7 @@ * * Implement the application's Status Bar. * - * Version: @(#)win_stbar.c 1.0.15 2018/03/06 + * Version: @(#)win_stbar.c 1.0.16 2018/03/17 * * Authors: Miran Grca, * Fred N. van Kempen, @@ -1076,6 +1076,8 @@ StatusBarProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Switching from image to the same image. Do nothing. */ break; } + if (!cdrom_image[id].prev_image_path) + cdrom_image[id].prev_image_path = (wchar_t *) malloc(1024); wcscpy(cdrom_image[id].prev_image_path, cdrom_image[id].image_path); cdrom_drives[id].handler->exit(id); cdrom_close(id);