diff options
Diffstat (limited to 'src/mbgl/style/paint_property.hpp')
-rw-r--r-- | src/mbgl/style/paint_property.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/style/paint_property.hpp b/src/mbgl/style/paint_property.hpp index 332ec051dc..6da1ed53b4 100644 --- a/src/mbgl/style/paint_property.hpp +++ b/src/mbgl/style/paint_property.hpp @@ -44,7 +44,9 @@ public: } const PropertyValue<T>& get() const { - return isUndefined() ? values.at(ClassID::Fallback) : values.at(ClassID::Default); + static const PropertyValue<T> staticValue; + const auto it = values.find(ClassID::Default); + return it == values.end() ? staticValue : it->second; } void set(const PropertyValue<T>& value_, const optional<std::string>& klass) { |