From 8a7ff3c9c391f2659149bcba1000df5b2a340466 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Fri, 1 Nov 2024 19:21:00 +0000 Subject: [PATCH] Base: fix crash when no enumeration item --- src/base/property_enumeration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/property_enumeration.cpp b/src/base/property_enumeration.cpp index 1ef57091..5a009912 100644 --- a/src/base/property_enumeration.cpp +++ b/src/base/property_enumeration.cpp @@ -16,7 +16,7 @@ PropertyEnumeration::PropertyEnumeration( ) : Property(grp, name), m_enumeration(enumeration), - m_value(enumeration && enumeration->empty() ? enumeration->itemAt(0).value : -1) + m_value(enumeration && !enumeration->empty() ? enumeration->itemAt(0).value : -1) { }