Commit 87bb2276 authored by Kai Koehne's avatar Kai Koehne

QmlJSDebugger: Don't crash when using wheel & no items selected

Task-number: QTCREATORBUG-2739
Reviewed-by: Lasse Holmstedt
parent 18390154
......@@ -351,6 +351,9 @@ void SelectionTool::wheelEvent(QWheelEvent *event)
QList<QGraphicsItem*> itemList = QDeclarativeViewObserverPrivate::get(observer())->selectableItems(event->pos());
if (itemList.isEmpty())
return;
int selectedIdx = 0;
if (!observer()->selectedItems().isEmpty()) {
selectedIdx = itemList.indexOf(observer()->selectedItems().first());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment