From 6a504fe19f7a318f341c03e87ef3df3db2ddb8f6 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 19 Oct 2016 17:48:12 +0200 Subject: [PATCH] filebrowser: fix 8b2c0a9a0d86204e9d1e2d9f8aea5950d650113e Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/85cd0952f28493a4673d9a7c5baab61f6d64be3f Author: vanhofen Date: 2016-10-19 (Wed, 19 Oct 2016) Origin message was: ------------------ - filebrowser: fix 8b2c0a9a0d86204e9d1e2d9f8aea5950d650113e --- src/gui/filebrowser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 0c3e5547e..29abece6c 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -1172,9 +1172,6 @@ void CFileBrowser::paintItem(unsigned int pos) std::string fileicon; unsigned int currpos = liststart + pos; - if (currpos >= filelist.size()) - return; - actual_file = &filelist[currpos]; bool i_selected = currpos == selected; @@ -1194,6 +1191,9 @@ void CFileBrowser::paintItem(unsigned int pos) frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, i_radius); + if (currpos >= filelist.size()) + return; + if (g_settings.filebrowser_showrights == 0 && S_ISREG(actual_file->Mode)) colwidth2 = 0; else