From bd48fc0b8e26142601ccba8016a61f219ccdbf91 Mon Sep 17 00:00:00 2001 From: auria Date: Mon, 22 Jun 2009 01:45:56 +0000 Subject: [PATCH] protection against bogus config files git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3635 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/config/user_config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/user_config.cpp b/src/config/user_config.cpp index 80be1c1ed..f9980b9af 100644 --- a/src/config/user_config.cpp +++ b/src/config/user_config.cpp @@ -333,7 +333,7 @@ UserConfig *user_config; UserConfig::UserConfig() { setDefaults(); - if(!loadConfig()) + if(!loadConfig() || UserConfigParams::m_player.size() == 0) { addDefaultPlayer(); } @@ -343,7 +343,7 @@ UserConfig::UserConfig() UserConfig::UserConfig(const std::string& filename) { setDefaults(); - if(!loadConfig(filename)) + if(!loadConfig(filename) || UserConfigParams::m_player.size() == 0) { addDefaultPlayer(); }