[gthumb] color manager: fixed crash when no device is found
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gthumb] color manager: fixed crash when no device is found
- Date: Tue, 24 Oct 2017 17:18:00 +0000 (UTC)
commit b90cbcd38726bd5a06d14c2cc6c1f2f7f68c403b
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Oct 23 19:38:31 2017 +0200
    color manager: fixed crash when no device is found
    
    [bug #789347]
 gthumb/gth-color-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/gth-color-manager.c b/gthumb/gth-color-manager.c
index 109d244..c2958ae 100644
--- a/gthumb/gth-color-manager.c
+++ b/gthumb/gth-color-manager.c
@@ -275,7 +275,7 @@ find_device_by_kind_cb (GObject      *source_object,
        CdDevice  *device;
 
        devices = cd_client_get_devices_by_kind_finish (cd_client, res, NULL);
-       if (devices->len == 0) {
+       if ((devices == NULL) || (devices->len == 0)) {
                g_task_return_pointer (task, NULL, NULL);
                g_object_unref (task);
                return;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]