From ee26ea9e5726e0dc25cac1a09413731a05e7c97e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 6 May 2021 22:09:24 +0200 Subject: [PATCH] neutrino.cpp: try to avoid possible memleak Watched with LeakSanitizer on generic pc. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b738597178fcb1093131ed4b5967343191707833 Author: Thilo Graf Date: 2021-05-06 (Thu, 06 May 2021) ------------------ This commit was generated by Migit --- src/neutrino.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index b699bb7fb..72b2ff84e 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3112,9 +3112,11 @@ TIMER_START(); SHTDCNT::getInstance()->init(); #ifdef ENABLE_LCD4LINUX - LCD4l = new CLCD4l(); - if(g_settings.lcd4l_support) + if (g_settings.lcd4l_support) { + if (LCD4l == NULL) + LCD4l = new CLCD4l(); LCD4l->StartLCD4l(); + } #endif CZapit::getInstance()->SetScanSDT(g_settings.enable_sdt);