diff --git a/src/race/highscores.cpp b/src/race/highscores.cpp
index 83dbbbf0a..1a6ed5fe7 100644
--- a/src/race/highscores.cpp
+++ b/src/race/highscores.cpp
@@ -107,10 +107,14 @@ void Highscores::writeEntry(std::ofstream &writer)
for(int i=0; i\n";
+ if (m_time[i] > 0.0f)
+ {
+ assert(m_kart_name[i].size() > 0);
+ writer << " \n";
+ }
} // for i
writer << " \n";
} // writeEntry
@@ -151,6 +155,8 @@ int Highscores::addData(const std::string& kart_name,
{
for(int j=HIGHSCORE_LEN-2;j>=i;j--)
{
+ assert(m_kart_name[j].size() > 0);
+ assert(m_time[j] > 0);
m_name[j+1] = m_name[j];
m_kart_name[j+1] = m_kart_name[j];
m_time[j+1] = m_time[j];