[gnome-disk-utility] Fix a crasher when determining unallocated on unactivated drives
- From: David Zeuthen <davidz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] Fix a crasher when determining unallocated on unactivated drives
- Date: Sat, 8 Aug 2009 19:47:50 +0000 (UTC)
commit 2766b195353af7f3b74f706572987ceb7d97d028
Author: David Zeuthen <davidz redhat com>
Date: Sat Aug 8 15:46:06 2009 -0400
Fix a crasher when determining unallocated on unactivated drives
src/gdu/gdu-drive.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/gdu/gdu-drive.c b/src/gdu/gdu-drive.c
index 0852ac2..46fb0ba 100644
--- a/src/gdu/gdu-drive.c
+++ b/src/gdu/gdu-drive.c
@@ -264,8 +264,10 @@ gdu_drive_has_unallocated_space_real (GduDrive *drive,
pres = NULL;
device = gdu_presentable_get_device (GDU_PRESENTABLE (drive));
+ if (device == NULL)
+ goto out;
- if (device != NULL && gdu_device_is_read_only (device))
+ if (gdu_device_is_read_only (device))
goto out;
if (gdu_device_is_removable (device) && !gdu_device_is_media_available (device))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]