CTextBox: ensure save screen only if dimensions are valid

0 values are critical
This commit is contained in:
2015-04-13 10:37:45 +02:00
committed by svenhoefer
parent cd53fae2c6
commit 87cbb564a3

View File

@@ -579,8 +579,10 @@ void CTextBox::refreshText(void)
if (!m_nPaintBackground && m_SaveScreen) {
if (m_bgpixbuf == NULL){
//TRACE("[CTextBox] %s save bg %d\r\n", __FUNCTION__, __LINE__);
m_bgpixbuf= new fb_pixel_t[dx * dy];
frameBuffer->SaveScreen(ax, ay, dx, dy, m_bgpixbuf);
if ((dx * dy) >0){
m_bgpixbuf= new fb_pixel_t[dx * dy];
frameBuffer->SaveScreen(ax, ay, dx, dy, m_bgpixbuf);
}
}
}