2
0
Эх сурвалжийг харах

null check on getClassName

Nicolas Cannasse 19 жил өмнө
parent
commit
d1e376af6c
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  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
 		Returns the complete name of the class of an object
 	**/
 	**/
 	public static function getClassName( c : Class ) : String {
 	public static function getClassName( c : Class ) : String {
+		if( c == null )
+			return null;
 		#if flash9
 		#if flash9
 			return untyped __global__["flash.utils.getQualifiedClassName"](c);
 			return untyped __global__["flash.utils.getQualifiedClassName"](c);
 		#else true
 		#else true