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;