diff --git a/src/widgets/DecompilerWidget.cpp b/src/widgets/DecompilerWidget.cpp index c54ad6f9..b00c0ccd 100644 --- a/src/widgets/DecompilerWidget.cpp +++ b/src/widgets/DecompilerWidget.cpp @@ -347,8 +347,10 @@ void DecompilerWidget::decompilationFinished(RzAnnotatedCode *codeDecompiled) } } - ui->textEdit->horizontalScrollBar()->setSliderPosition(scrollHistory[historyPos].first); - ui->textEdit->verticalScrollBar()->setSliderPosition(scrollHistory[historyPos].second); + if (!scrollHistory.empty()) { + ui->textEdit->horizontalScrollBar()->setSliderPosition(scrollHistory[historyPos].first); + ui->textEdit->verticalScrollBar()->setSliderPosition(scrollHistory[historyPos].second); + } } void DecompilerWidget::setAnnotationsAtCursor(size_t pos)