diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-04 21:57:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-04 21:57:32 +0300 |
commit | 8a5603e487f682f5f67bc2cedae81249aa138f5b (patch) | |
tree | 697535ca4d8e50ee6da8cf364cad814fa5f7603a /src/configuration.cpp | |
parent | 80f7177ea4ce0185e1ef3355e91dcf14617d0f09 (diff) | |
parent | f2d1d2b43a0ebdb625aea94cb4b8ff7fce6bf8f4 (diff) | |
download | mv-8a5603e487f682f5f67bc2cedae81249aa138f5b.tar.gz mv-8a5603e487f682f5f67bc2cedae81249aa138f5b.tar.bz2 mv-8a5603e487f682f5f67bc2cedae81249aa138f5b.tar.xz mv-8a5603e487f682f5f67bc2cedae81249aa138f5b.zip |
Merge branch 'master' into stable
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r-- | src/configuration.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp index 55ad392f3..cb7adf8f1 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -2,7 +2,7 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2013 The ManaPlus Developers + * Copyright (C) 2011-2014 The ManaPlus Developers * * This file is part of The ManaPlus Client. * @@ -801,6 +801,9 @@ void ConfigurationObject::writeToXML(const XmlTextWriterPtr writer) void Configuration::write() { + if (mConfigPath.empty()) + return; + // Do not attempt to write to file that cannot be opened for writing FILE *const testFile = fopen(mConfigPath.c_str(), "w"); if (!testFile) |