From cc028cee30992b333594bf918440ca4414f9a912 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 30 Nov 2009 20:58:31 +0000 Subject: [PATCH] Fix sporadic access violation when a new row was inserted and UPDATE or INSERT gets posted. Fixes issue #1496 --- source/main.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/main.pas b/source/main.pas index 150e8264..a283473e 100644 --- a/source/main.pas +++ b/source/main.pas @@ -6768,6 +6768,8 @@ end; function TMainForm.DataGridPostUpdateOrInsert(Node: PVirtualNode): Boolean; begin Result := True; + if not Assigned(Node) then + Exit; if Cardinal(High(DataGridResult.Rows)) >= Node.Index then case DataGridResult.Rows[Node.Index].State of grsModified: Result := GridPostUpdate(DataGrid);