fix possible segfault and negative height

This commit is contained in:
Jacek Jendrzej
2016-10-31 15:53:29 +01:00
parent 5804ed2d3a
commit b8849d53b5
4 changed files with 16 additions and 1 deletions

View File

@@ -445,6 +445,9 @@ void CInfoViewer::paintHead()
void CInfoViewer::paintBody()
{
int h_body = InfoHeightY - header_height - OFFSET_SHADOW;
if(h_body < 0)
h_body = 0;
infoViewerBB->initBBOffset();
if (!zap_mode)
h_body += infoViewerBB->bottom_bar_offset;