summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-10 07:00:46 +0000
committerJared Adams <jaxad0127@gmail.com>2009-02-10 07:00:46 +0000
commit0a6f64d8e708d740c72886989a839edd7e8a2a5f (patch)
treed513c3e2af2d21cf65b2d78b79f14ecfa9e70dc0 /src/main.cpp
parentf6265cedd655a6dcb0467b48d08e0722e5d697e3 (diff)
downloadmana-0a6f64d8e708d740c72886989a839edd7e8a2a5f.tar.gz
mana-0a6f64d8e708d740c72886989a839edd7e8a2a5f.tar.bz2
mana-0a6f64d8e708d740c72886989a839edd7e8a2a5f.tar.xz
mana-0a6f64d8e708d740c72886989a839edd7e8a2a5f.zip
Fix crash due to missing login wallpaper
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d446944c..3a562b25 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -817,7 +817,10 @@ int main(int argc, char *argv[])
else if (screenWidth >= 1600)
wallpaperName = "graphics/images/login_wallpaper_1600x1200.png";
- login_wallpaper = ResourceManager::getInstance()-> getImage(wallpaperName);
+ if (!ResourceManager::getInstance()->exists(wallpaperName))
+ wallpaperName = "graphics/images/login_wallpaper.png";
+
+ login_wallpaper = ResourceManager::getInstance()->getImage(wallpaperName);
if (!login_wallpaper)
logger->log(_("Couldn't load %s as wallpaper"), wallpaperName.c_str());