From 944b3a5b6cd93df49bf040d88ef6bc8263856363 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Wed, 31 Jan 2024 15:31:51 +0100 Subject: [PATCH] fix: Selection valid check not working correctly --- lib/libimhex/source/api/imhex_api.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libimhex/source/api/imhex_api.cpp b/lib/libimhex/source/api/imhex_api.cpp index 3b50a97d7..504126adb 100644 --- a/lib/libimhex/source/api/imhex_api.cpp +++ b/lib/libimhex/source/api/imhex_api.cpp @@ -175,7 +175,8 @@ namespace hex { } bool isSelectionValid() { - return getSelection().has_value(); + auto selection = getSelection(); + return selection.has_value() && selection->provider != nullptr; } std::optional getSelection() {