mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Fix a crash when printing disassembly arrows
This commit is contained in:
parent
8d4c860690
commit
90f5f2d4cc
@ -870,16 +870,17 @@ void DisassemblyLeftPanel::paintEvent(QPaintEvent *event)
|
||||
p.fillRect(event->rect(), Config()->getColor("gui.background").darker(115));
|
||||
|
||||
QList<DisassemblyLine> lines = disas->getLines();
|
||||
if (lines.size() == 0) {
|
||||
// No line to print, abort early
|
||||
return;
|
||||
}
|
||||
|
||||
using LineInfo = std::pair<RVA, int>;
|
||||
std::vector<LineInfo> lineOffsets;
|
||||
lineOffsets.reserve(lines.size() + arrows.size());
|
||||
|
||||
RVA minViewOffset = 0, maxViewOffset = 0;
|
||||
|
||||
if (lines.size() > 0) {
|
||||
minViewOffset = maxViewOffset = lines[0].offset;
|
||||
}
|
||||
minViewOffset = maxViewOffset = lines[0].offset;
|
||||
|
||||
for (int i = 0; i < lines.size(); i++) {
|
||||
lineOffsets.emplace_back(lines[i].offset, i);
|
||||
|
Loading…
Reference in New Issue
Block a user