GetPropertyValue access violation

Nevermore
Tue, 24 Jan 2017 22:40:53 +0000
C++

when I try to get the property value the editor crashes with access violation, names of the properties themselves are read correctly

FText ULibFunctions::GetTextField(UObject* obj, FString name)
{
	for (TFieldIterator<UTextProperty> Prop(obj->GetClass()); Prop; ++Prop) {


		if (Prop->GetNameCPP() == name) {
			FText val = Prop->GetPropertyValue(obj);
			return val;
		}
	}
	return FText();

}

3 posts - 1 participant