Explorar o código

Fixed sleep timers getting freed twice
* Fixes #2042.
Thanks to @Encon21!

aleos %!s(int64=8) %!d(string=hai) anos
pai
achega
4b9ade33ee
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/map/script.c

+ 2 - 1
src/map/script.c

@@ -4063,7 +4063,8 @@ void script_stop_sleeptimers(int id) {
 		if (!st)
 			break; // No more sleep timers
 
-		script_free_state(st);
+		if (st->oid == id)
+			script_free_state(st);
 	}
 }