|
From: Tapio V. <aa...@us...> - 2010-08-03 11:37:29
|
Module: performous
Branch: joinmenu
Commit: 931c5874d4ca8fcc230a6f5e476cb1548a6e6723
Author: Fredrik Klasson <fr...@li...>
Date: Fri Jul 30 21:40:00 2010 +0200
Load the SVG if loading the cache file fails instead of aborting with a fatal error.
---
game/surface.cc | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/game/surface.cc b/game/surface.cc
index 319e0e7..d93ad08 100644
--- a/game/surface.cc
+++ b/game/surface.cc
@@ -52,7 +52,11 @@ template <typename T> void loader(T& target, fs::path name) {
// SVG file is newer we should update cache
loadSVG(target, filename, cache_filename.string());
} else {
- loadPNG(target, cache_filename.string());
+ try {
+ loadPNG(target, cache_filename.string());
+ }catch (std::runtime_error){
+ loadSVG(target, filename, cache_filename.string());
+ }
}
} else {
loadSVG(target, filename, cache_filename.string());
|