diff --git a/Plugins/UnLua/Source/UnLua/Private/ReflectionUtils/PropertyDesc.cpp b/Plugins/UnLua/Source/UnLua/Private/ReflectionUtils/PropertyDesc.cpp index 95ccc657..ed1f3e7e 100644 --- a/Plugins/UnLua/Source/UnLua/Private/ReflectionUtils/PropertyDesc.cpp +++ b/Plugins/UnLua/Source/UnLua/Private/ReflectionUtils/PropertyDesc.cpp @@ -271,7 +271,7 @@ class FObjectPropertyDesc : public FPropertyDesc explicit FObjectPropertyDesc(FProperty *InProperty, bool bSoftObject) : FPropertyDesc(InProperty), MetaClass(nullptr), IsSoftObject(bSoftObject) { - if (ObjectBaseProperty->PropertyClass->IsChildOf(UClass::StaticClass())) + if (ObjectBaseProperty->PropertyClass && ObjectBaseProperty->PropertyClass->IsChildOf(UClass::StaticClass())) { MetaClass = bSoftObject ? (((FSoftClassProperty*)Property)->MetaClass) : ((FClassProperty*)Property)->MetaClass; }