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() {