Author: dfranke
Date: Sun Mar 22 05:09:56 2009
New Revision: 34015

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34015&view=rev
Log:
Fix 'Trying to open file with empty name' stdout spam in MP lobby

Modified:
    trunk/src/filesystem.cpp

Modified: trunk/src/filesystem.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/filesystem.cpp?rev=34015&r1=34014&r2=34015&view=diff
==============================================================================
--- trunk/src/filesystem.cpp (original)
+++ trunk/src/filesystem.cpp Sun Mar 22 05:09:56 2009
@@ -680,7 +680,9 @@
 
 std::string read_map(const std::string& name)
 {
-       std::string res = read_file(get_wml_location("maps/" + name));
+        std::string res;
+        std::string map_location = get_wml_location("maps/" + name);
+        if(!map_location.empty()) res = read_file(map_location);
 
        if (res.empty()) {
                res = read_file(get_user_data_dir() + "/editor/maps/" + name);


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to