GetPropertyValue access violation

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();

}

Hi Nevermore, did you ever find out the reason for the access violation? Having the same issue.

Found a solution. In my case using GetObjectPropertyValue_InContainer instead did the trick and no more access violation.