DBoxLCD: Initialize _buffer to prevent segfault
authorAthanasios Oikonomou <athoik@gmail.com>
Sun, 6 Dec 2015 19:36:08 +0000 (21:36 +0200)
committerErik Slagter <erik@openpli.org>
Mon, 7 Dec 2015 14:16:06 +0000 (15:16 +0100)
commit85e5c4941fd7fa97e11beca87839a1a1695cb204
tree8cee9a455967da6b3932e73dce94159f6403af55
parentcfe2cafa7abaf2ba16c4f6e3c14b1e5499edf962
DBoxLCD: Initialize _buffer to prevent segfault

Since commit ac977040b7c9fa3474272a1568e5f00b4963c1eb
when the box has no LCD on destructor we are trying
to free non initialized memory causing segfault.

Initialize _buffer to NULL to prevent this from happen.

(cherry picked from commit 0c49846d922b672d94530a734b61b37ba40da213)
Signed-off-by: Erik Slagter <erik@openpli.org>
lib/gdi/lcd.cpp