[rhythmbox] play-order: do not try to unref null query model



commit 5fd3c3ac7af43d3bd67c223f4b62511b1dc7c946
Author: Jamie Nicol <jamie thenicols net>
Date:   Mon Feb 8 10:56:54 2010 +0000

    play-order: do not try to unref null query model
    
    Stop unreffing new_model in rb_play_order_query_model_changed
    if both the old model and new_model are NULL.

 shell/rb-play-order.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/shell/rb-play-order.c b/shell/rb-play-order.c
index 73c560b..6c15432 100644
--- a/shell/rb-play-order.c
+++ b/shell/rb-play-order.c
@@ -512,7 +512,8 @@ rb_play_order_query_model_changed (RBPlayOrder *porder)
 		g_object_get (porder->priv->source, "query-model", &new_model, NULL);
 
 	if (porder->priv->query_model == new_model) {
-		g_object_unref (new_model);
+		if (new_model != NULL)
+			g_object_unref (new_model);
 		return;
 	}
 



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