CC channel-display-gst.lo
channel-display-gst.c: In function ‘new_sample’:
channel-display-gst.c:192:31: error: potential null pointer dereference
[-Werror=null-dereference]
frame->sample = sample;
~~~~~~~~~~~~~~^~~~~~~~
Signed-off-by: Marc-André Lureau <[email protected]>
---
src/channel-display-gst.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 46a85ea..f162078 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -189,8 +189,11 @@ static GstFlowReturn new_sample(GstAppSink *gstappsink,
gpointer video_decoder)
}
/* The frame is now ready for display */
- frame->sample = sample;
- g_queue_push_tail(decoder->display_queue, frame);
+ if (frame) {
+ frame->sample = sample;
+ g_queue_push_tail(decoder->display_queue, frame);
+ }
+
break;
}
l = l->next;
--
2.7.4
_______________________________________________
Spice-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/spice-devel