diff --git a/src/properties/property.cpp b/src/properties/property.cpp index 5e4189811d..157aa6d261 100644 --- a/src/properties/property.cpp +++ b/src/properties/property.cpp @@ -217,6 +217,9 @@ void Property::setViewOption(std::string option, bool value) { } bool Property::viewOption(const std::string& option, bool defaultValue) const { + if (!_metaData.hasValue(_metaDataKeyViewPrefix)) { + return defaultValue; + } ghoul::Dictionary d = _metaData.value(_metaDataKeyViewPrefix); if (d.hasKey(option)) { return d.value(option);