File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Sources/GateEngine/Resources/Geometry Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ extension ResourceManager {
118118 let key = Cache . GeometryKey ( requestedPath: path, kind: . lines, geometryOptions: . none)
119119 if cache. geometries [ key] == nil {
120120 cache. geometries [ key] = Cache . GeometryCache ( )
121- if let lines = lines {
121+ if let lines = lines, lines . isEmpty == false {
122122 Game . unsafeShared. resourceManager. incrementLoading ( path: key. requestedPath)
123123
124124 if let cache = self . cache. geometries [ key] {
Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ public struct RawLines: Sendable {
1212 var indices : [ UInt16 ]
1313
1414 public var isEmpty : Bool {
15- return indices. isEmpty
15+ // If at least 2 points exists, then we have 1 line and are not empty
16+ return indices. count < 2
1617 }
1718
1819 public init ( ) {
You can’t perform that action at this time.
0 commit comments