src/gui/channellist.cpp fix possible segfault after edit mode (heap-buffer-overflow)

This commit is contained in:
Jacek Jendrzej
2015-12-19 20:18:49 +01:00
parent beeeeb224a
commit d6246131d2

View File

@@ -1850,6 +1850,9 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
iscurrent = SameTP((*chanlist)[curr]);
}
if(selected >= (*chanlist).size())
selected = (*chanlist).size()-1;
if (curr == selected) {
color = COL_MENUCONTENTSELECTED_TEXT;
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;