From 2ba9b7f2effdd660f8205c5074dea043ba84f853 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Wed, 15 Nov 2006 20:44:46 +0000 Subject: [PATCH] Fix segfault if no WSS info in config --- vvideorec.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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); -- 2.39.5