Skip to content

Commit 71ca9eb

Browse files
committed
Fix spurious cross-reference updates during startup initialization. Save the polar bears.
1 parent 627456d commit 71ca9eb

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

ui/viewframe.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,22 @@ struct BINARYNINJAUIAPI SelectionInfoForXref
3434
// At any given time, at most one of these four should be true.
3535
bool addrValid, typeValid, typeFieldValid, localVarValid;
3636

37-
BNFunctionGraphType ilSource;
37+
BNFunctionGraphType ilSource = InvalidILViewType;
3838

39-
uint64_t start;
40-
uint64_t end;
39+
uint64_t start = 0;
40+
uint64_t end = 0;
4141

4242
BinaryNinja::QualifiedName type;
43-
uint64_t offset;
43+
uint64_t offset = 0;
4444

4545
BinaryNinja::Variable var;
4646

4747
// These two need to be tested against nullptr before de-referencing
4848
FunctionRef func;
4949
ArchitectureRef arch;
5050

51+
SelectionInfoForXref() : addrValid(false), typeValid(false), typeFieldValid(false), localVarValid(false) { }
52+
5153
bool operator==(const SelectionInfoForXref& other) const
5254
{
5355
if (addrValid && other.addrValid)

ui/xreflist.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ class BINARYNINJAUIAPI CrossReferenceWidget : public SidebarWidget, public UICon
644644
bool m_navToNextOrPrevStarted = false;
645645
bool m_pinned;
646646
bool m_uiMaxItemsExceeded = false;
647+
bool m_hasInitialSelection = false;
647648

648649
QWidget* m_header = nullptr;
649650

0 commit comments

Comments
 (0)