Don't dereference identifier_type if it is NULL (#579558)

This commit is contained in:
Alexander Larsson 2009-05-20 14:46:51 +02:00 committed by Matthias Clasen
parent c2ed17a1a7
commit 91e8f21c93

View File

@ -487,7 +487,8 @@ g_unix_volume_get_identifier (GVolume *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 NULL;
}