Przeglądaj źródła

ChannelBase: prevent crash on getEffect when channel has already be released

trethaller 6 lat temu
rodzic
commit
084cae977f
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      hxd/snd/ChannelBase.hx

+ 1 - 0
hxd/snd/ChannelBase.hx

@@ -16,6 +16,7 @@ class ChannelBase {
 	}
 
 	public function getEffect<T:Effect>( etype : Class<T> ) : T {
+		if(effects == null) return null;  // Already released
 		for (e in effects) {
 			var e = Std.instance(e, etype);
 			if (e != null) return e;