Skip to content

Commit 7353ebc

Browse files
committed
fix: crash in tree focus change without focused node
1 parent f60b9a1 commit 7353ebc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎source/main.pas‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10225,7 +10225,8 @@ procedure TMainForm.DBtreeFocusChanging(Sender: TBaseVirtualTree; OldNode,
1022510225
// Check if some editor has unsaved changes
1022610226
if Assigned(ActiveObjectEditor) and Assigned(NewNode) and (NewNode <> OldNode) and (not FTreeRefreshInProgress) then begin
1022710227
Allowed := not (ActiveObjectEditor.DeInit in [mrAbort, mrCancel]);
10228-
DBTree.Selected[DBTree.FocusedNode] := not Allowed;
10228+
if Assigned(DBTree.FocusedNode) then
10229+
DBTree.Selected[DBTree.FocusedNode] := not Allowed;
1022910230
end else
1023010231
Allowed := NewNode <> OldNode;
1023110232
end;

0 commit comments

Comments
 (0)