mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
CTextBox: ensure restore of background, if pixbuf exists
This may prevent undefined behavior or even possible segfaults
Origin commit data
------------------
Commit: 302649eca4
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-10-20 (Sun, 20 Oct 2013)
This commit is contained in:
@@ -525,13 +525,16 @@ void CTextBox::refreshText(void)
|
||||
|
||||
//Paint Text Background
|
||||
if (m_nPaintBackground){
|
||||
if (m_bgpixbuf)
|
||||
if (m_bgpixbuf){
|
||||
delete[] m_bgpixbuf;
|
||||
m_bgpixbuf = NULL;
|
||||
}
|
||||
frameBuffer->paintBoxRel(ax, ay, dx, dy, m_textBackgroundColor, m_nBgRadius, m_nBgRadiusType);
|
||||
}
|
||||
else
|
||||
else{
|
||||
if (m_bgpixbuf)
|
||||
frameBuffer->RestoreScreen(ax, ay, dx, dy, m_bgpixbuf);
|
||||
}
|
||||
|
||||
if( m_nNrOfLines <= 0)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user