From f6dc04320d26bb8b8a984fa4f1ea2beb229de652 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Wed, 12 Aug 2020 15:40:12 +0300 Subject: [PATCH] Add surface sanity check --- components/streams/src/receiver.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/streams/src/receiver.cpp b/components/streams/src/receiver.cpp index 58171e8be..738e3f0bf 100644 --- a/components/streams/src/receiver.cpp +++ b/components/streams/src/receiver.cpp @@ -279,6 +279,11 @@ void Receiver::_processVideo(const StreamPacket &spkt, const Packet &pkt) { return; } + if (tx == 0 || ty == 0) { + LOG(ERROR) << "No Packets"; + return; + } + auto &surface = ividstate.surface[static_cast<int>(spkt.channel)]; // Allocate a decode surface, this is a tiled image to be split later -- GitLab