From 678ddcfcbe64c794c6b871e078d88a84ef07e217 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Wed, 15 Nov 2006 20:48:22 +0000 Subject: [PATCH] Fix segfault if wss data not available in config --- vvideolive.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vvideolive.cc b/vvideolive.cc index 8bd9fdd..51babf3 100644 --- a/vvideolive.cc +++ b/vvideolive.cc @@ -46,11 +46,14 @@ VVideoLive::VVideoLive(ChannelList* tchanList, ULONG tstreamType, VChannelList* Colour transparent(0, 0, 0, 0); setBackgroundColour(transparent); + dowss = false; char* optionWSS = vdr->configLoad("General", "WSS"); - if (strstr(optionWSS, "Yes")) dowss = true; - else dowss = false; + if (optionWSS) + { + if (strstr(optionWSS, "Yes")) dowss = true; + delete[] optionWSS; + } Log::getInstance()->log("VVideoLive", Log::DEBUG, "Do WSS: %u", dowss); - delete[] optionWSS; wss.setSurface(surface); wss.setWide(true); -- 2.39.2