Skip to content

Commit

Permalink
Merge pull request #304 from cjmayo/empty
Browse files Browse the repository at this point in the history
Base: fix crash when no enumeration item
  • Loading branch information
HuguesDelorme authored Nov 1, 2024
2 parents a71af05 + 8a7ff3c commit ab327d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base/property_enumeration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
}

Expand Down

0 comments on commit ab327d9

Please sign in to comment.