[libdmapsharing] Don't g_object_unref server unless != NULL Signed-off-by: W. Michael Petullo <mike flyn org>



commit cc2a5536ab68ecd5846c21857be801ce75a6ee47
Author: W. Michael Petullo <mike flyn org>
Date:   Sat Mar 19 19:22:51 2011 -0500

    Don't g_object_unref server unless != NULL
    Signed-off-by: W. Michael Petullo <mike flyn org>

 libdmapsharing/dacp-share.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libdmapsharing/dacp-share.c b/libdmapsharing/dacp-share.c
index 3897ae2..ece1ba5 100644
--- a/libdmapsharing/dacp-share.c
+++ b/libdmapsharing/dacp-share.c
@@ -541,9 +541,9 @@ dacp_share_send_playstatusupdate (DACPShare * share)
 						     (SoupMessage *)
 						     list->data);
 		}
+		g_object_unref (server);
 	}
 
-	g_object_unref (server);
 	server = NULL;
 
 	g_object_get (share, "server-ipv6", &server, NULL);
@@ -557,10 +557,9 @@ dacp_share_send_playstatusupdate (DACPShare * share)
 						     (SoupMessage *)
 						     list->data);
 		}
+		g_object_unref (server);
 	}
 
-	g_object_unref (server);
-
 	g_slist_free (share->priv->update_queue);
 	share->priv->update_queue = NULL;
 }



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