mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
neutrino: fix crashes on invalid fonts
with the latest fontrenderer fix, invalid fonts now can lead to division by zero errors. fix the occurences I found. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@43 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -451,6 +451,8 @@ int CChannelList::show()
|
||||
if(theight < PIC_H) theight = PIC_H;
|
||||
|
||||
fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight();
|
||||
if (fheight == 0)
|
||||
fheight = 1; /* avoid crash on invalid font */
|
||||
listmaxshow = (height - theight - buttonHeight -0)/fheight;
|
||||
height = theight + buttonHeight + listmaxshow * fheight;
|
||||
//info_height = fheight + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getHeight() + 10;
|
||||
|
Reference in New Issue
Block a user