From 5a9c658fb2ae75a792e78aa117aedf1b13dad4d5 Mon Sep 17 00:00:00 2001 From: Hugh Sanderson Date: Thu, 30 Nov 2023 20:53:45 +0800 Subject: [PATCH] Add Matrix print. Check http object for null headerMap --- src/nme/geom/Matrix3D.hx | 8 ++++++++ src/nme/net/HttpLoader.hx | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/nme/geom/Matrix3D.hx b/src/nme/geom/Matrix3D.hx index 94e9ddbf0..4e19f03e7 100644 --- a/src/nme/geom/Matrix3D.hx +++ b/src/nme/geom/Matrix3D.hx @@ -615,6 +615,14 @@ class Matrix3D } } + public function print() + { + Sys.println('[ $mxx $mxy $mxz | $tx ]'); + Sys.println('[ $myx $myy $myz | $ty ]'); + Sys.println('[ $mzx $mzy $mzz | $tz ]'); + Sys.println('[ $mwx $mwy $mwz | $tw ]'); + } + inline public function transpose():Void { var oRawData = rawData.copy(); diff --git a/src/nme/net/HttpLoader.hx b/src/nme/net/HttpLoader.hx index d4996fb99..6291849ff 100644 --- a/src/nme/net/HttpLoader.hx +++ b/src/nme/net/HttpLoader.hx @@ -237,6 +237,8 @@ class HttpLoader public function getHeaders() : Array { var headerMap = http.responseHeaders; + if (headerMap==null) + return []; return [ for(h in headerMap.keys()) h + ": " + headerMap.get(h) ]; }