Fix the dictionary loading error path
This commit is contained in:
parent
852667350b
commit
1df7021276
@ -378,7 +378,9 @@ stardict_dict_finalize (GObject *self)
|
|||||||
{
|
{
|
||||||
StardictDictPrivate *priv = STARDICT_DICT (self)->priv;
|
StardictDictPrivate *priv = STARDICT_DICT (self)->priv;
|
||||||
|
|
||||||
|
if (priv->info)
|
||||||
stardict_info_free (priv->info);
|
stardict_info_free (priv->info);
|
||||||
|
|
||||||
g_array_free (priv->index, TRUE);
|
g_array_free (priv->index, TRUE);
|
||||||
g_array_free (priv->synonyms, TRUE);
|
g_array_free (priv->synonyms, TRUE);
|
||||||
|
|
||||||
@ -705,8 +707,8 @@ stardict_dict_new_from_info (StardictInfo *sdi, GError **error)
|
|||||||
return sd;
|
return sd;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
g_array_free (priv->index, TRUE);
|
|
||||||
g_free (base);
|
g_free (base);
|
||||||
|
priv->info = NULL;
|
||||||
g_object_unref (sd);
|
g_object_unref (sd);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user