mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
CComponentsHeader: add missing check for null pointer
This commit is contained in:
@@ -343,16 +343,20 @@ void CComponentsHeader::initLogo()
|
||||
* with previous or next item.
|
||||
*/
|
||||
if (cch_caption_align & CC_TITLE_LEFT){
|
||||
if (prev_item){
|
||||
int left_tag = prev_item->getXPos() + prev_item->getWidth();
|
||||
if (x_logo <= left_tag)
|
||||
x_logo = left_tag + logo_space/2 - w_logo/2;
|
||||
}
|
||||
}
|
||||
|
||||
if (cch_caption_align & CC_TITLE_RIGHT){
|
||||
if (next_item){
|
||||
if (x_logo + w_logo >= next_item->getXPos())
|
||||
x_logo = next_item->getXPos() - logo_space/2 - w_logo/2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Finally set logo x position
|
||||
|
Reference in New Issue
Block a user