Using g_clear_object() instead of g_object_unref() in ag_window_set_chart
This commit is contained in:
		| @@ -854,6 +854,7 @@ ag_chart_load_from_file(GFile *file, GError **err) | ||||
|     house_system_enum_name = g_utf8_strdown(house_system_name, -1); | ||||
|     g_free(house_system_name); | ||||
|     house_system_class = g_type_class_ref(GSWE_TYPE_HOUSE_SYSTEM); | ||||
|  | ||||
|     if ((enum_value = g_enum_get_value_by_nick( | ||||
|                  G_ENUM_CLASS(house_system_class), | ||||
|                  house_system_enum_name | ||||
|   | ||||
| @@ -1233,7 +1233,7 @@ ag_window_set_chart(AgWindow *window, AgChart *chart) | ||||
|                 chart_changed, | ||||
|                 window | ||||
|             ); | ||||
|         g_object_unref(priv->chart); | ||||
|         g_clear_object(&(priv->chart)); | ||||
|     } | ||||
|  | ||||
|     priv->chart = chart; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user