cc_frm_footer: avoid division by 0

Origin commit data
------------------
Branch: ni/coolstream
Commit: f7a95bd3ac
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-30 (Fri, 30 Jun 2017)

Origin message was:
------------------
- cc_frm_footer: avoid division by 0

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-06-30 10:41:24 +02:00
parent 2cfa7f7e1f
commit 6655f0c124

View File

@@ -333,10 +333,14 @@ void CComponentsFooter::paintButtons(const int& x_pos,
Font* font,
bool do_save_bg)
{
int lw = label_width;
if (label_count > 0 && label_width == 0)
lw = (w/label_count) - 2*cch_offset;
this->setDimensionsAll(x_pos, y_pos, w, h);
this->setButtonFont(font);
this->setContextButton(context_buttons);
this->setButtonLabels(content, label_count, 0, label_width ? label_width : (w/label_count) - 2*cch_offset);
this->setButtonLabels(content, label_count, 0, lw);
this->paint(do_save_bg);
}