AppOutputPane: check that index in range

this fixes regression introduced here
942d024bc6

Change-Id: Icc28341c87a5c390df91700530db434ce211725a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Nikita Baryshnikov
2016-08-01 00:09:47 +03:00
parent e59c16ef00
commit 62a4e22fe7

View File

@@ -650,7 +650,7 @@ void AppOutputPane::enableButtons(const RunControl *rc, bool isRunning)
void AppOutputPane::tabChanged(int i)
{
const int index = indexOf(m_tabWidget->widget(i));
if (i != -1) {
if (i != -1 && index != -1) {
const RunControl *rc = m_runControlTabs.at(index).runControl;
enableButtons(rc, rc->isRunning());
} else {