Make gswe_planet_info_free() free its name only if it is set
This commit is contained in:
parent
b689d3153d
commit
0fb888a940
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user