From: Chris Tallon Date: Wed, 15 Nov 2006 20:44:46 +0000 (+0000) Subject: Fix segfault if no WSS info in config X-Git-Tag: r0-2-5~29 X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=2ba9b7f2effdd660f8205c5074dea043ba84f853;p=vompclient.git Fix segfault if no WSS info in config --- diff --git a/vvideorec.cc b/vvideorec.cc index 621163b..8e9dabc 100644 --- a/vvideorec.cc +++ b/vvideorec.cc @@ -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);