projects
/
platform
/
upstream
/
udisks2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bebb0c9
)
Don't dereference a NULL pointer
author
David Zeuthen
<davidz@redhat.com>
Tue, 16 Aug 2011 17:05:13 +0000
(13:05 -0400)
committer
David Zeuthen
<davidz@redhat.com>
Tue, 16 Aug 2011 17:05:13 +0000
(13:05 -0400)
Signed-off-by: David Zeuthen <davidz@redhat.com>
src/udiskslinuxdriveobject.c
patch
|
blob
|
history
diff --git
a/src/udiskslinuxdriveobject.c
b/src/udiskslinuxdriveobject.c
index
2874429
..
29e9520
100644
(file)
--- a/
src/udiskslinuxdriveobject.c
+++ b/
src/udiskslinuxdriveobject.c
@@
-401,9
+401,12
@@
udisks_linux_drive_object_get_device (UDisksLinuxDriveObject *object,
{
GUdevDevice *ret;
/* TODO: actually look at @get_hw */
- ret = object->devices->data;
- if (ret != NULL)
- g_object_ref (ret);
+ if (object->devices != NULL)
+ {
+ ret = object->devices->data;
+ if (ret != NULL)
+ g_object_ref (ret);
+ }
return ret;
}