mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 22:46:15 +01:00
Don't dereference identifier_type if it is NULL (#579558)
This commit is contained in:
parent
d0d10e847f
commit
ab29e09dac
@ -487,7 +487,8 @@ g_unix_volume_get_identifier (GVolume *volume,
|
|||||||
{
|
{
|
||||||
GUnixVolume *unix_volume = G_UNIX_VOLUME (volume);
|
GUnixVolume *unix_volume = G_UNIX_VOLUME (volume);
|
||||||
|
|
||||||
if (strcmp (kind, unix_volume->identifier_type) == 0)
|
if (unix_volume->identifier_type != NULL &&
|
||||||
|
strcmp (kind, unix_volume->identifier_type) == 0)
|
||||||
return g_strdup (unix_volume->identifier);
|
return g_strdup (unix_volume->identifier);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user