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


Origin commit data
------------------
Commit: 83d7657b9d
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2009-12-13 (Sun, 13 Dec 2009)
This commit is contained in:
Stefan Seyfried
2009-12-13 12:25:38 +00:00
parent 2b4089bf5a
commit 3ddf21f92e
4 changed files with 10 additions and 1 deletions

View File

@@ -79,7 +79,10 @@ CHintBox::CHintBox(const neutrino_locale_t Caption, const char * const Text, con
else
break;
}
entries_per_page = ((height - theight) / fheight) - 1;
if (fheight != 0)
entries_per_page = ((height - theight) / fheight) - 1;
else /* avoid division by zero */
entries_per_page = 1;
current_page = 0;
unsigned int additional_width;