Explorar el Código

fix(SoulsTidy): null ptr

Azure hace 1 año
padre
commit
e5e11849ac
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      script.py

+ 3 - 0
script.py

@@ -356,6 +356,9 @@ class Script:
         # 处理御魂溢出
         # 处理御魂溢出
         from tasks.Utils.post_diagnotor import PostDiagnotor, AnalyzeType
         from tasks.Utils.post_diagnotor import PostDiagnotor, AnalyzeType
         image = getattr(self.device, 'image', None)
         image = getattr(self.device, 'image', None)
+        # image为None则不做处理
+        if image is None:
+            return
         analyse_type = PostDiagnotor().handle(e=e, command=command, image=image)
         analyse_type = PostDiagnotor().handle(e=e, command=command, image=image)
         if analyse_type == AnalyzeType.SoulOverflow:
         if analyse_type == AnalyzeType.SoulOverflow:
             self.config.task_call('SoulsTidy')
             self.config.task_call('SoulsTidy')