From 36e1ad94e1775e866cd207c3b7260814d53178d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege@collabora.co.uk>
Date: Fri, 3 Sep 2010 19:58:49 +0200
Subject: [PATCH] gstquery: Only fill the start/stop values of the buffering
 ranges if a non-NULL pointer was provided

---
 gst/gstquery.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gst/gstquery.c b/gst/gstquery.c
index 72103885ee..4732198cbc 100644
--- a/gst/gstquery.c
+++ b/gst/gstquery.c
@@ -1400,8 +1400,10 @@ gst_query_parse_nth_buffering_range (GstQuery * query, guint index,
   ranges = (GValueArray *) g_value_get_boxed (value);
   range_value = g_value_array_get_nth (ranges, index);
   if (range_value) {
-    *start = gst_value_get_int64_range_min (range_value);
-    *stop = gst_value_get_int64_range_max (range_value);
+    if (start)
+      *start = gst_value_get_int64_range_min (range_value);
+    if (stop)
+      *stop = gst_value_get_int64_range_max (range_value);
     ret = TRUE;
   }