mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-20 03:46:11 +00:00
Fix null-deref in disassembler
This commit is contained in:
parent
8c8ca6b9a4
commit
a0e5cd2d34
@ -1590,7 +1590,11 @@ void MemoryWidget::on_disasTextEdit_2_cursorPositionChanged()
|
|||||||
QTextCursor tc = this->disasTextEdit->textCursor();
|
QTextCursor tc = this->disasTextEdit->textCursor();
|
||||||
tc.select(QTextCursor::LineUnderCursor);
|
tc.select(QTextCursor::LineUnderCursor);
|
||||||
QString lastline = tc.selectedText().trimmed();
|
QString lastline = tc.selectedText().trimmed();
|
||||||
QString ele = lastline.split(" ", QString::SkipEmptyParts)[0];
|
QList<QString> words = lastline.split(" ", QString::SkipEmptyParts);
|
||||||
|
if (words.length() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QString ele = words[0];
|
||||||
if (ele.contains("0x"))
|
if (ele.contains("0x"))
|
||||||
{
|
{
|
||||||
this->fillOffsetInfo(ele);
|
this->fillOffsetInfo(ele);
|
||||||
|
Loading…
Reference in New Issue
Block a user