From c0a0d6987c9f8f930a5ba71ac0ac14d68f72f34d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 13 Nov 2014 10:48:05 +0100 Subject: [PATCH] hddstat.cpp: move init of cHddStat inside geInstance() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c30b3ece65c96079862cad163b0906f9b0748393 Author: vanhofen Date: 2014-11-13 (Thu, 13 Nov 2014) Origin message was: ------------------ - hddstat.cpp: move init of cHddStat inside geInstance() ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/system/hddstat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/hddstat.cpp b/src/system/hddstat.cpp index 37318e795..979dedf24 100644 --- a/src/system/hddstat.cpp +++ b/src/system/hddstat.cpp @@ -41,10 +41,10 @@ #include #include -static cHddStat *instance = NULL; - cHddStat *cHddStat::getInstance(void) { + static cHddStat *instance = NULL; + if (!instance) instance = new cHddStat; return instance;