mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
small fix when finishing tasks
This commit is contained in:
@@ -71,7 +71,7 @@ class Battery: Module {
|
||||
}
|
||||
|
||||
public func stop() {
|
||||
if self.task!.state.isRunning {
|
||||
if self.task != nil && self.task!.state.isRunning {
|
||||
self.task?.pause()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user