[gnome-disk-utility/gnome-2-28] Don't crash when presentable has no device
- From: David Zeuthen <davidz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/gnome-2-28] Don't crash when presentable has no device
- Date: Mon, 2 Nov 2009 19:20:20 +0000 (UTC)
commit a4a54d8dee8dc4e18583dfa3ca7f3440edd3d981
Author: Tomas Bzatek <tbzatek redhat com>
Date: Fri Oct 30 17:27:44 2009 +0100
Don't crash when presentable has no device
Found during mdraid arrays testing.
Signed-off-by: David Zeuthen <davidz redhat com>
src/gdu/gdu-volume.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gdu/gdu-volume.c b/src/gdu/gdu-volume.c
index 2a7efbe..9ae869e 100644
--- a/src/gdu/gdu-volume.c
+++ b/src/gdu/gdu-volume.c
@@ -229,7 +229,8 @@ get_names_and_desc (GduPresentable *presentable,
drive_presentable = gdu_presentable_get_toplevel (presentable);
if (drive_presentable != NULL) {
drive_device = gdu_presentable_get_device (drive_presentable);
- drive_media = gdu_device_drive_get_media (drive_device);
+ if (drive_device != NULL)
+ drive_media = gdu_device_drive_get_media (drive_device);
}
label = gdu_device_id_get_label (volume->priv->device);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]