[rhythmbox] android: don't crash if no storage is available



commit 7a40d34a802546a8f39cc8157022a2b709b4e1a9
Author: Jonathan Matthew <jonathan d14n org>
Date:   Tue Feb 2 20:46:17 2016 +1000

    android: don't crash if no storage is available
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744775

 plugins/android/rb-android-source.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/android/rb-android-source.c b/plugins/android/rb-android-source.c
index b5d6b4e..0f75ec8 100644
--- a/plugins/android/rb-android-source.c
+++ b/plugins/android/rb-android-source.c
@@ -154,6 +154,11 @@ update_free_space (RBAndroidSource *source)
                return;
        }
 
+       if (priv->storage == NULL) {
+               rb_debug ("no storage to query");
+               return;
+       }
+
        priv->storage_free_space_next = 0;
        priv->storage_capacity_next = 0;
        priv->query_storage = priv->storage;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]