neutrino: avoid crash in channellist with extreme font sizes

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@235 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 29d88227b9
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2010-01-31 (Sun, 31 Jan 2010)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2010-01-31 15:29:12 +00:00
parent 71c0883a69
commit 8958bf5728

View File

@@ -1324,9 +1324,11 @@ void CChannelList::paintDetails(int index)
text1 = text1.substr( 0, pos );
} while ( ( pos != -1 ) && (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text1, true) > (width - 30 - seit_len) ) );
std::string text3 = p_event->description.substr(text1.length()+ 1);
std::string text3 = ""; /* not perfect, but better than crashing... */
if (p_event->description.length() > text1.length())
text3 = p_event->description.substr(text1.length()+ 1);
if (!(text2.empty()))
if (!text2.empty() && !text3.empty())
text3= text3+ " - ";
xstart += g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text3, true);