Explorar o código

null check on getClassName

Nicolas Cannasse %!s(int64=19) %!d(string=hai) anos
pai
achega
d1e376af6c
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      std/Type.hx

+ 2 - 0
std/Type.hx

@@ -93,6 +93,8 @@ class Type {
 		Returns the complete name of the class of an object
 	**/
 	public static function getClassName( c : Class ) : String {
+		if( c == null )
+			return null;
 		#if flash9
 			return untyped __global__["flash.utils.getQualifiedClassName"](c);
 		#else true