From d51628fa204f20c1a7b32ffeab355b6e79da27c1 Mon Sep 17 00:00:00 2001 From: Michael Griebling Date: Mon, 27 Feb 2023 09:00:14 -0500 Subject: [PATCH] Fix a table-related crash. --- Sources/SwiftMath/MathRender/MTMathListBuilder.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftMath/MathRender/MTMathListBuilder.swift b/Sources/SwiftMath/MathRender/MTMathListBuilder.swift index e680fef..3d17621 100644 --- a/Sources/SwiftMath/MathRender/MTMathListBuilder.swift +++ b/Sources/SwiftMath/MathRender/MTMathListBuilder.swift @@ -695,8 +695,9 @@ public struct MTMathListBuilder { return list } else { // Create a new table with the current list and a default env - let table = self.buildTable(env: nil, firstList:list, isRow:true) - return MTMathList(atom: table!) + if let table = self.buildTable(env: nil, firstList:list, isRow:true) { + return MTMathList(atom: table) + } } } else if command == "end" { if currentEnv == nil {