mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed bug in menu header if title is NULL
This commit is contained in:
parent
6accb0b563
commit
7af7daafc2
@ -49,6 +49,8 @@ void cVeDmHeader::SetTokenContainer(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cVeDmHeader::SetTitle(const char *title) {
|
void cVeDmHeader::SetTitle(const char *title) {
|
||||||
|
if (!title)
|
||||||
|
return;
|
||||||
if (this->title && !strcmp(this->title, title))
|
if (this->title && !strcmp(this->title, title))
|
||||||
return;
|
return;
|
||||||
free(this->title);
|
free(this->title);
|
||||||
@ -79,12 +81,13 @@ void cVeDmHeader::Set(eMenuCategory menuCat) {
|
|||||||
//check for standard menu entries
|
//check for standard menu entries
|
||||||
bool hasIcon = false;
|
bool hasIcon = false;
|
||||||
|
|
||||||
string icon = imgCache->GetIconName(title, menuCat);
|
if (title) {
|
||||||
if (imgCache->MenuIconExists(icon))
|
string icon = imgCache->GetIconName(title, menuCat);
|
||||||
hasIcon = true;
|
if (imgCache->MenuIconExists(icon))
|
||||||
|
hasIcon = true;
|
||||||
tokenContainer->AddStringToken((int)eDMHeaderST::icon, icon.c_str());
|
tokenContainer->AddStringToken((int)eDMHeaderST::icon, icon.c_str());
|
||||||
tokenContainer->AddIntToken((int)eDMHeaderIT::hasicon, hasIcon);
|
tokenContainer->AddIntToken((int)eDMHeaderIT::hasicon, hasIcon);
|
||||||
|
}
|
||||||
|
|
||||||
//Disc Usage
|
//Disc Usage
|
||||||
tokenContainer->AddStringToken((int)eDMHeaderST::vdrusagestring, *cVideoDiskUsage::String());
|
tokenContainer->AddStringToken((int)eDMHeaderST::vdrusagestring, *cVideoDiskUsage::String());
|
||||||
|
Loading…
Reference in New Issue
Block a user