X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FScreen.cc;h=0548f5acb5e8f86fc256689cf0efd8534e721396;hb=0a3cfdfcb956024639a05549a50586e3d826b42e;hp=445156713b9e4ed51eaf0e13682cf3dec471ab96;hpb=940c1f614fa380a9153c3b81d0614201b27957c2;p=chaz%2Fopenbox diff --git a/src/Screen.cc b/src/Screen.cc index 44515671..0548f5ac 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1192,8 +1192,15 @@ void BScreen::load() { rname.seekp(0); rclass.seekp(0); rname << rscreen.str() << "strftimeFormat" << ends; rclass << rscreen.str() << "StrftimeFormat" << ends; - if (config.getValue(rname.str(), rclass.str(), s)) + + if (resource.strftime_format != NULL){ + delete [] resource.strftime_format; + resource.strftime_format=NULL; + } + + if (config.getValue(rname.str(), rclass.str(), s)) { resource.strftime_format = bstrdup(s.c_str()); + } #else // !HAVE_STRFTIME rname.seekp(0); rclass.seekp(0); rname << rscreen.str() << "dateFormat" << ends; @@ -1230,8 +1237,14 @@ void BScreen::load() { rname.seekp(0); rclass.seekp(0); rname << rscreen.str() << "rootCommand" << ends; rclass << rscreen.str() << "RootCommand" << ends; - if (config.getValue(rname.str(), rclass.str(), s)) + + if (resource.root_command != NULL){ + delete [] resource.root_command; + resource.root_command=NULL; + } + if (config.getValue(rname.str(), rclass.str(), s)) { resource.root_command = bstrdup(s.c_str()); + } rname.seekp(0); rclass.seekp(0); rname << rscreen.str() << "opaqueMove" << ends;