]> git.vomp.tv Git - vompclient.git/commitdiff
Fix segfault if wss data not available in config
authorChris Tallon <chris@vomp.tv>
Wed, 15 Nov 2006 20:48:22 +0000 (20:48 +0000)
committerChris Tallon <chris@vomp.tv>
Wed, 15 Nov 2006 20:48:22 +0000 (20:48 +0000)
vvideolive.cc

index 8bd9fddeea2fb03eaa1d61ab01b24d3b95772762..51babf3212cb08923b704b764fda7a3750186541 100644 (file)
@@ -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);