소스 검색

fix in copyTexture if from/to null

Nicolas Cannasse 3 년 전
부모
커밋
af6711b1bd
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      h3d/impl/DirectXDriver.hx

+ 2 - 0
h3d/impl/DirectXDriver.hx

@@ -894,6 +894,8 @@ class DirectXDriver extends h3d.impl.Driver {
 			from.preventAutoDispose();
 			to.alloc();
 			from.lastFrame = prev;
+			if( from.t == null ) throw "assert";
+			if( to.t == null ) return false;
 		}
 		to.t.res.copyResource(from.t.res);
 		to.flags.set(WasCleared);