[libgdata] [youtube] Fix potential unref of NULL
- From: Philip Withnall <pwithnall src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgdata] [youtube] Fix potential unref of NULL
- Date: Mon, 21 Sep 2009 07:30:52 +0000 (UTC)
commit 9faa7ae4d66e7814399e22fd7ff8da15087e9679
Author: Philip Withnall <philip tecnocode co uk>
Date: Mon Sep 21 08:28:40 2009 +0100
[youtube] Fix potential unref of NULL
This fixes a crash when querying for a single video without a
GDataQuery.
gdata/services/youtube/gdata-youtube-service.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdata/services/youtube/gdata-youtube-service.c b/gdata/services/youtube/gdata-youtube-service.c
index df1ca37..108c453 100644
--- a/gdata/services/youtube/gdata-youtube-service.c
+++ b/gdata/services/youtube/gdata-youtube-service.c
@@ -561,7 +561,8 @@ static void
query_single_video_async_data_free (QuerySingleVideoAsyncData *data)
{
g_free (data->video_id);
- g_object_unref (data->query);
+ if (data->query != NULL)
+ g_object_unref (data->query);
g_slice_free (QuerySingleVideoAsyncData, data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]