fixed Bug that double vars were not handled correctly

This commit is contained in:
louis 2015-01-26 17:10:17 +01:00
parent d0868978bc
commit 705eefc1f0
3 changed files with 21 additions and 4 deletions

View File

@ -184,3 +184,9 @@ Version 0.1.6
or more skin names start identically
Version 0.2.0
- fixed Bug that double vars were not handled correctly
- fixed Bug that calling mplayer plugin via keymacros.conf causes segfault
Version 0.2.1

View File

@ -112,6 +112,11 @@ void cGlobals::ReplaceDoubleVars(string &value) {
stringstream st;
st << it->second;
string doubleVal = st.str();
if (config.replaceDecPoint) {
if (doubleVal.find_first_of('.') != string::npos) {
std::replace( doubleVal.begin(), doubleVal.end(), '.', config.decPoint);
}
}
value = value.replace(foundToken, token.size(), doubleVal);
}
}

View File

@ -31,12 +31,18 @@ cDisplayMenuRootView::cDisplayMenuRootView(cTemplateView *rootView) : cView(root
}
cDisplayMenuRootView::~cDisplayMenuRootView() {
if (view)
if (view) {
delete view;
if (listView)
view = NULL;
}
if (listView) {
delete listView;
if (detailView)
listView = NULL;
}
if (detailView) {
delete detailView;
detailView = NULL;
}
}
/*******************************************************************
@ -337,7 +343,7 @@ void cDisplayMenuRootView::Clear(void) {
}
void cDisplayMenuRootView::ClearRootView(void) {
if (defaultBackgroundDrawn && view->BackgroundImplemented())
if (defaultBackgroundDrawn && view && view->BackgroundImplemented())
ClearViewElement(veBackground);
if (defaultHeaderDrawn)
ClearViewElement(veHeader);