We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 02d3503 + c3d4579 commit a79893aCopy full SHA for a79893a
Sources/SKCore/BuildSystemManager.swift
@@ -299,7 +299,10 @@ extension BuildSystemManager: BuildSystem {
299
300
public func unregisterForChangeNotifications(for uri: DocumentURI) {
301
queue.async {
302
- let mainFile = self.watchedFiles[uri]!.mainFile
+ guard let mainFile = self.watchedFiles[uri]?.mainFile else {
303
+ log("Unbalanced calls for registerForChangeNotifications and unregisterForChangeNotifications", level: .warning)
304
+ return
305
+ }
306
self.watchedFiles[uri] = nil
307
self.checkUnreferencedMainFile(mainFile)
308
}
0 commit comments