Make gswe_planet_info_free() free its name only if it is set

This commit is contained in:
Gergely Polonkai 2014-03-16 09:52:18 +01:00
parent b689d3153d
commit 0fb888a940

View File

@ -69,7 +69,10 @@ gswe_planet_info_ref(GswePlanetInfo *planet_info)
static void
gswe_planet_info_free(GswePlanetInfo *planet_info)
{
g_free(planet_info->name);
if (planet_info->name) {
g_free(planet_info->name);
}
g_free(planet_info);
}