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:
seife
2009-12-13 12:25:38 +00:00
parent 5345573e5e
commit 83d7657b9d
4 changed files with 10 additions and 1 deletions

View File

@@ -386,6 +386,8 @@ void CFileBrowser::commonInit()
theight = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->getHeight();
fheight = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]->getHeight();
if (fheight == 0)
fheight = 1; /* avoid div by zero on invalid font */
foheight = 30;
liststart = 0;