aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Resource.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-04-03 17:14:00 (GMT)
committermarkt <markt>2007-04-03 17:14:00 (GMT)
commit06fb6cbd55dfabf1069d0603938e0d2d8d22581d (patch)
treed02b12518915bd23934deff497ba123a0830aa0f /src/FbTk/Resource.cc
parent48f761f9816f0f11e05dcc4e8f5ac506328e1683 (diff)
downloadfluxbox_pavel-06fb6cbd55dfabf1069d0603938e0d2d8d22581d.zip
fluxbox_pavel-06fb6cbd55dfabf1069d0603938e0d2d8d22581d.tar.bz2
fixed a bug, removed some unused code
Diffstat (limited to 'src/FbTk/Resource.cc')
-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;