diff --git a/src/ag-chart.c b/src/ag-chart.c index 43675fa..8950693 100644 --- a/src/ag-chart.c +++ b/src/ag-chart.c @@ -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 diff --git a/src/ag-window.c b/src/ag-window.c index 5a91bb8..fc0c363 100644 --- a/src/ag-window.c +++ b/src/ag-window.c @@ -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;