From c8ff9a572983931f07fed66a306db1aa04e34ceb Mon Sep 17 00:00:00 2001 From: Grim Maple Date: Fri, 19 May 2023 19:58:48 +0300 Subject: [PATCH] Fix access violation when reopening same menu item --- src/dlangui/widgets/menu.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dlangui/widgets/menu.d b/src/dlangui/widgets/menu.d index c4239bc1..5b64ff8f 100644 --- a/src/dlangui/widgets/menu.d +++ b/src/dlangui/widgets/menu.d @@ -813,7 +813,7 @@ class MenuWidgetBase : ListWidget { //selectItem(-1); selectOnHover = false; } else { - if(_openedPopupIndex == index) + if(_openedPopup !is null && _openedPopupIndex == index) { _openedPopup.close(); _openedPopup = null;