Fix endless loop/crash after resetting layout

This commit is contained in:
Jonathan Jenne
2022-07-27 09:31:44 +02:00
parent dc9ed0887d
commit 6e9b190f00
2 changed files with 14 additions and 8 deletions

View File

@@ -64,6 +64,11 @@ Public Class RefreshHelper
Private Function FindParentRowHandle(pRowInfo As RowInfo, oRowHandle As Integer) As Integer
Dim oParentRowHandle As Integer = _View.GetParentRowHandle(oRowHandle)
' Fixes endless loop when parent row handle is below zero
If oParentRowHandle < 0 Then
Return oParentRowHandle
End If
Do While _View.GetRowLevel(oParentRowHandle) <> pRowInfo.Level
oParentRowHandle = _View.GetParentRowHandle(oParentRowHandle)
Loop