LCD: fix for devices without LCD
authorMirakels <mirakels@openpli.org>
Wed, 9 Dec 2015 07:45:09 +0000 (08:45 +0100)
committerMirakels <mirakels@openpli.org>
Wed, 9 Dec 2015 07:45:09 +0000 (08:45 +0100)
lib/gdi/lcd.cpp
lib/python/Components/Lcd.py

index e15c4f6..20e5f78 100644 (file)
@@ -16,7 +16,7 @@ eLCD *eLCD::instance;
 
 eLCD::eLCD()
 {
-       _buffer = 0;
+       _buffer = NULL;
        lcdfd = -1;
        locked = 0;
        instance = this;
@@ -40,6 +40,7 @@ eLCD::~eLCD()
 {
        if (_buffer)
                delete [] _buffer;
+       instance = NULL;
 }
 
 int eLCD::lock()
index a1045aa..a6d1b32 100644 (file)
@@ -50,7 +50,7 @@ def standbyCounterChanged(configElement):
        config.lcd.standby.apply()
 
 def InitLcd():
-       detected = eDBoxLCD.getInstance().detected()
+       detected = eDBoxLCD.getInstance() and eDBoxLCD.getInstance().detected()
        SystemInfo["Display"] = detected
        config.lcd = ConfigSubsection();
        if detected: