浏览代码

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

Yuxiao Mao 1 年之前
父节点
当前提交
0737dec186
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;