aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Resource.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/FbTk/Resource.cc b/src/FbTk/Resource.cc
index cb45eac..3b857de 100644
--- a/src/FbTk/Resource.cc
+++ b/src/FbTk/Resource.cc
@@ -107,7 +107,15 @@ bool ResourceManager::load(const char *filename) {
107*/ 107*/
108bool ResourceManager::save(const char *filename, const char *mergefilename) { 108bool ResourceManager::save(const char *filename, const char *mergefilename) {
109 assert(filename); 109 assert(filename);
110 filename = StringUtil::expandFilename(filename).c_str(); 110
111 // these must be local variables; otherwise, the memory gets released by
112 // std::string, causing weird issues
113 string file_str = StringUtil::expandFilename(filename), mergefile_str;
114 filename = file_str.c_str();
115 if (mergefilename) {
116 mergefile_str = StringUtil::expandFilename(mergefilename);
117 mergefilename = mergefile_str.c_str();
118 }
111 119
112 // empty database 120 // empty database
113 XrmDatabaseHelper database; 121 XrmDatabaseHelper database;