diff --git a/happly.h b/happly.h index 46ded3e..4ee8c71 100644 --- a/happly.h +++ b/happly.h @@ -951,7 +951,7 @@ class Element { // Find the property std::unique_ptr& prop = getPropertyPtr(propertyName); - TypedProperty* castedProp = dynamic_cast*>(prop); + TypedProperty* castedProp = dynamic_cast*>(prop.get()); if (castedProp) { return castedProp->data; } @@ -994,7 +994,7 @@ class Element { // Find the property std::unique_ptr& prop = getPropertyPtr(propertyName); - TypedListProperty* castedProp = dynamic_cast*>(prop); + TypedListProperty* castedProp = dynamic_cast*>(prop.get()); if (castedProp) { return unflattenList(castedProp->flattenedData, castedProp->flattenedIndexStart); }