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) {
|
||||
if (!title)
|
||||
return;
|
||||
if (this->title && !strcmp(this->title, title))
|
||||
return;
|
||||
free(this->title);
|
||||
@ -79,12 +81,13 @@ void cVeDmHeader::Set(eMenuCategory menuCat) {
|
||||
//check for standard menu entries
|
||||
bool hasIcon = false;
|
||||
|
||||
if (title) {
|
||||
string icon = imgCache->GetIconName(title, menuCat);
|
||||
if (imgCache->MenuIconExists(icon))
|
||||
hasIcon = true;
|
||||
|
||||
tokenContainer->AddStringToken((int)eDMHeaderST::icon, icon.c_str());
|
||||
tokenContainer->AddIntToken((int)eDMHeaderIT::hasicon, hasIcon);
|
||||
}
|
||||
|
||||
//Disc Usage
|
||||
tokenContainer->AddStringToken((int)eDMHeaderST::vdrusagestring, *cVideoDiskUsage::String());
|
||||
|
Loading…
Reference in New Issue
Block a user