[glib/glib-2-20] Don't dereference identifier_type if it is NULL (#579558)
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Subject: [glib/glib-2-20] Don't dereference identifier_type if it is NULL (#579558)
- Date: Fri, 29 May 2009 01:30:04 -0400 (EDT)
commit 91e8f21c938fa7d0388f59cd229427996c128b90
Author: Alexander Larsson <alexl redhat com>
Date: Wed May 20 14:46:51 2009 +0200
Don't dereference identifier_type if it is NULL (#579558)
---
gio/gunixvolume.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gio/gunixvolume.c b/gio/gunixvolume.c
index 16e7067..91cb346 100644
--- a/gio/gunixvolume.c
+++ b/gio/gunixvolume.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]