diff options
Diffstat (limited to 'displaymenuview.c')
-rw-r--r-- | displaymenuview.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/displaymenuview.c b/displaymenuview.c index af5992e..f71f0c0 100644 --- a/displaymenuview.c +++ b/displaymenuview.c @@ -483,6 +483,8 @@ void cNopacityDisplayMenuView::ShowDiskUsage(bool show) { } void cNopacityDisplayMenuView::DrawButton(const char *text, int handleImage, tColor borderColor, int num) { + if (num < 0) + return; int top = 2*buttonsBorder; int left = num * buttonWidth + (2*num + 1) * buttonsBorder; pixmapFooter->DrawRectangle(cRect(left, top, buttonWidth, buttonHeight), borderColor); @@ -493,6 +495,8 @@ void cNopacityDisplayMenuView::DrawButton(const char *text, int handleImage, tCo } void cNopacityDisplayMenuView::ClearButton(int num) { + if (num < 0) + return; int top = 2*buttonsBorder; int left = num * buttonWidth + (2*num + 1) * buttonsBorder; pixmapFooter->DrawRectangle(cRect(left, top, buttonWidth, buttonHeight), Theme.Color(clrMenuBack)); |