Browse Source

Fix null access when tex has async flag but async loader is null

Yuxiao Mao 1 year ago
parent
commit
0737dec186
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hxd/res/Image.hx

+ 1 - 1
hxd/res/Image.hx

@@ -559,7 +559,7 @@ class Image extends Resource {
 		}
 
 		function load() {
-			if ((enableAsyncLoading || tex.flags.has(AsyncLoading)) && asyncData == null && ASYNC_LOADER.isSupported(this))
+			if ((enableAsyncLoading || tex.flags.has(AsyncLoading)) && asyncData == null && ASYNC_LOADER != null && ASYNC_LOADER.isSupported(this))
 				@:privateAccess {
 				tex.dispose();
 				tex.format = RGBA;