mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CTextBox: ensure save screen only if dimensions are valid
0 values are critical
This commit is contained in:
@@ -579,10 +579,12 @@ void CTextBox::refreshText(void)
|
|||||||
if (!m_nPaintBackground && m_SaveScreen) {
|
if (!m_nPaintBackground && m_SaveScreen) {
|
||||||
if (m_bgpixbuf == NULL){
|
if (m_bgpixbuf == NULL){
|
||||||
//TRACE("[CTextBox] %s save bg %d\r\n", __FUNCTION__, __LINE__);
|
//TRACE("[CTextBox] %s save bg %d\r\n", __FUNCTION__, __LINE__);
|
||||||
|
if ((dx * dy) >0){
|
||||||
m_bgpixbuf= new fb_pixel_t[dx * dy];
|
m_bgpixbuf= new fb_pixel_t[dx * dy];
|
||||||
frameBuffer->SaveScreen(ax, ay, dx, dy, m_bgpixbuf);
|
frameBuffer->SaveScreen(ax, ay, dx, dy, m_bgpixbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Paint Text Background
|
//Paint Text Background
|
||||||
bool allow_paint_bg = (m_old_cText != m_cText || has_changed || m_has_scrolled);
|
bool allow_paint_bg = (m_old_cText != m_cText || has_changed || m_has_scrolled);
|
||||||
|
Reference in New Issue
Block a user