Ver Fonte

Fix null access when no depth format is bound

TothBenoit há 11 meses atrás
pai
commit
0d0690b809
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      h3d/impl/DX12Driver.hx

+ 2 - 0
h3d/impl/DX12Driver.hx

@@ -841,6 +841,8 @@ class DX12Driver extends h3d.impl.Driver {
 
 
 	function toDxgiDepthFormat( format : hxd.PixelFormat ) {
 	function toDxgiDepthFormat( format : hxd.PixelFormat ) {
 		switch( format ) {
 		switch( format ) {
+			case null:
+				return cast 0;
 			case Depth16:
 			case Depth16:
 				return  D16_UNORM;
 				return  D16_UNORM;
 			case Depth24Stencil8, Depth24:
 			case Depth24Stencil8, Depth24: