]> git.vomp.tv Git - vompclient-marten.git/commitdiff
Fix segfault if no WSS info in config
authorChris Tallon <chris@vomp.tv>
Wed, 15 Nov 2006 20:44:46 +0000 (20:44 +0000)
committerChris Tallon <chris@vomp.tv>
Wed, 15 Nov 2006 20:44:46 +0000 (20:44 +0000)
vvideorec.cc

index 621163b7132ba22fbd681d3e1ab9b186f35a21e6..8e9dabcdf1e7bf6abadaea73c43b40b48e35607a 100644 (file)
@@ -84,11 +84,14 @@ VVideoRec::VVideoRec(Recording* rec)
   barShowing = false;
   stickyBar = false;
 
+  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("VVideoRec", Log::DEBUG, "Do WSS: %u", dowss);
-  delete[] optionWSS;
 
   wss.setSurface(surface);
   wss.setWide(true);