[rhythmbox] track-transfer-queue: missing null check



commit e111135aa0cd1cc701a49b664386c9aede066fc8
Author: Jonathan Matthew <jonathan d14n org>
Date:   Wed May 15 20:45:08 2013 +1000

    track-transfer-queue: missing null check
    
    if there's no current batch, we definitely don't need to cancel it

 shell/rb-track-transfer-queue.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/shell/rb-track-transfer-queue.c b/shell/rb-track-transfer-queue.c
index 7d1c52e..9768b79 100644
--- a/shell/rb-track-transfer-queue.c
+++ b/shell/rb-track-transfer-queue.c
@@ -594,7 +594,10 @@ rb_track_transfer_queue_find_batch_by_source (RBTrackTransferQueue *queue, RBSou
        data.source = source;
 
        /* check the current batch */
-       find_batches (queue->priv->current, &data);
+       if (queue->priv->current != NULL) {
+               find_batches (queue->priv->current, &data);
+       }
+
        g_queue_foreach (queue->priv->batch_queue, (GFunc) find_batches, &data);
        return data.results;
 }


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