Browse Source

Fix: layout exception calculation may fail in some cases

Marcin Ziąbek 1 year ago
parent
commit
5f539c8826
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/QuestPDF/Drawing/DocumentGenerator.cs

+ 1 - 1
Source/QuestPDF/Drawing/DocumentGenerator.cs

@@ -261,7 +261,7 @@ namespace QuestPDF.Drawing
 
                 var inside = rootCause
                     .ExtractAncestors()
-                    .First(x => x.Value.Child is SourceCodePointer)
+                    .First(x => x.Value.Child is SourceCodePointer or DebugPointer)
                     .Children
                     .First()
                     .FormatLayoutSubtree();