Explorar el Código

handle NULL pointer error

jblanked hace 10 meses
padre
commit
baf468a18b
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      game/enemy.c

+ 4 - 1
game/enemy.c

@@ -696,5 +696,8 @@ void spawn_enemy(Level *level, GameManager *manager, FuriString *json)
     furi_string_free(attack_timer);
     furi_string_free(strength);
     furi_string_free(health);
-    furi_string_free(is_user);
+    if (is_user)
+    {
+        furi_string_free(is_user);
+    }
 }