From 47a7076ab06617198111f1005327e8ef9c9b5ab6 Mon Sep 17 00:00:00 2001 From: auria Date: Thu, 26 Jan 2012 18:14:01 +0000 Subject: [PATCH] Avoid potential crash with challenges git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10726 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/challenges/game_slot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/challenges/game_slot.cpp b/src/challenges/game_slot.cpp index 20bd872b1..e7c1db328 100644 --- a/src/challenges/game_slot.cpp +++ b/src/challenges/game_slot.cpp @@ -214,7 +214,8 @@ void GameSlot::save(XMLWriter& out) for(i = m_challenges_state.begin(); i != m_challenges_state.end(); i++) { - i->second->save(out); + if (i->second != NULL) + i->second->save(out); } out << " \n"; }