From: Chris Tallon Date: Wed, 15 Nov 2006 20:48:22 +0000 (+0000) Subject: Fix segfault if wss data not available in config X-Git-Tag: r0-2-5~28 X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=678ddcfcbe64c794c6b871e078d88a84ef07e217;p=vompclient.git Fix segfault if wss data not available in config --- 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);