diff os2/dw.c @ 2615:ac51cbdcfbe5

dw_menu_destroy() should zero out the handle passed, GTK does this already. Also check the pointer is valid before using it in Mac and iOS.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 23 Jul 2021 15:28:42 +0000
parents da058319f717
children d17e3fb76bde
line wrap: on
line diff
--- a/os2/dw.c	Fri Jul 23 14:52:32 2021 +0000
+++ b/os2/dw.c	Fri Jul 23 15:28:42 2021 +0000
@@ -6055,7 +6055,10 @@
 void API dw_menu_destroy(HMENUI *menu)
 {
    if(menu)
+   {
       WinDestroyWindow(*menu);
+      *menu = 0;
+   }
 }
 
 /* Internal function to make sure menu ID isn't in use */