@@ -13,8 +13,7 @@ static PyObject *py_ue_fslate_style_set_set_content_root(ue_PyFSlateStyleSet *se
1313
1414 self->style_set ->SetContentRoot (path);
1515
16- Py_INCREF (Py_None);
17- return Py_None;
16+ Py_RETURN_NONE;
1817}
1918
2019static PyObject *py_ue_fslate_style_set_register (ue_PyFSlateStyleSet *self, PyObject * args)
@@ -96,7 +95,7 @@ namespace
9695 PyObject* pyGetWidgetStyle (FSlateStyleSet& InStyle, FName PropertyName)
9796 {
9897 const WidgetStyleType styleWidgetStyle = InStyle.GetWidgetStyle <WidgetStyleType>(PropertyName);
99- return py_ue_new_uscriptstruct (WidgetStyleType::StaticStruct (), (uint8*)&styleWidgetStyle);
98+ return py_ue_new_owned_uscriptstruct (WidgetStyleType::StaticStruct (), (uint8*)&styleWidgetStyle);
10099 }
101100}
102101
@@ -116,24 +115,24 @@ static PyObject *py_ue_fslate_style_set_get(ue_PyFSlateStyleSet *self, PyObject
116115 if (ue_py_check_struct<FSlateSound>(py_type))
117116 {
118117 const FSlateSound& styleSound = self->style_set ->GetSound (FName (name));
119- ret = py_ue_new_uscriptstruct (FSlateSound::StaticStruct (), (uint8*)&styleSound);
118+ ret = py_ue_new_owned_uscriptstruct (FSlateSound::StaticStruct (), (uint8*)&styleSound);
120119 }
121120 else if (ue_py_check_struct<FSlateBrush>(py_type))
122121 {
123122 if (const FSlateBrush* styleBrush = self->style_set ->GetBrush (FName (name)))
124123 {
125- ret = py_ue_new_uscriptstruct (FSlateBrush::StaticStruct (), (uint8*)styleBrush);
124+ ret = py_ue_new_owned_uscriptstruct (FSlateBrush::StaticStruct (), (uint8*)styleBrush);
126125 }
127126 }
128127 else if (ue_py_check_struct<FSlateColor>(py_type))
129128 {
130129 const FSlateColor styleSlateColor = self->style_set ->GetSlateColor (FName (name));
131- ret = py_ue_new_uscriptstruct (FSlateColor::StaticStruct (), (uint8*)&styleSlateColor);
130+ ret = py_ue_new_owned_uscriptstruct (FSlateColor::StaticStruct (), (uint8*)&styleSlateColor);
132131 }
133132 else if (ue_py_check_struct<FSlateFontInfo>(py_type))
134133 {
135134 const FSlateFontInfo styleFontInfo = self->style_set ->GetFontStyle (FName (name));
136- ret = py_ue_new_uscriptstruct (FSlateFontInfo::StaticStruct (), (uint8*)&styleFontInfo);
135+ ret = py_ue_new_owned_uscriptstruct (FSlateFontInfo::StaticStruct (), (uint8*)&styleFontInfo);
137136 }
138137 else if (ue_py_check_childstruct<FSlateWidgetStyle>(py_type))
139138 {
0 commit comments