From 1a748903e4c79d3df86919a5ccb4946222a93416 Mon Sep 17 00:00:00 2001 From: a1ext Date: Tue, 15 Jan 2019 09:48:30 +0300 Subject: [PATCH] Fixed DisassemblyWidget's eventFilter crash (#1111) * Fixed DisassemblyWidget's eventFilter crash (usage of a non-initialized member before assignment) * Alignment fix, just to trigger appveyor build --- src/widgets/DisassemblyWidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widgets/DisassemblyWidget.cpp b/src/widgets/DisassemblyWidget.cpp index 6775dad0..ac8d8f24 100644 --- a/src/widgets/DisassemblyWidget.cpp +++ b/src/widgets/DisassemblyWidget.cpp @@ -583,8 +583,8 @@ void DisassemblyWidget::moveCursorRelative(bool up, bool page) bool DisassemblyWidget::eventFilter(QObject *obj, QEvent *event) { - /*if ((obj == mDisasTextEdit || obj == mDisasTextEdit->viewport()) - && event->type() == QEvent::MouseButtonDblClick) { + if (event->type() == QEvent::MouseButtonDblClick + && (obj == mDisasTextEdit || obj == mDisasTextEdit->viewport())) { QMouseEvent *mouseEvent = static_cast(event); QTextCursor cursor = mDisasTextEdit->cursorForPosition(QPoint(mouseEvent->x(), mouseEvent->y())); @@ -595,7 +595,7 @@ bool DisassemblyWidget::eventFilter(QObject *obj, QEvent *event) if (jump == RVA_INVALID) { bool ok; RVA xref = Core()->cmdj("axfj@" + QString::number( - offset)).array().first().toObject().value("to").toVariant().toULongLong(&ok); + offset)).array().first().toObject().value("to").toVariant().toULongLong(&ok); if (ok) { jump = xref; } @@ -606,7 +606,7 @@ bool DisassemblyWidget::eventFilter(QObject *obj, QEvent *event) } return true; - }*/ + } return CutterDockWidget::eventFilter(obj, event); }