Переглянути джерело

null check on getClassName

Nicolas Cannasse 19 роки тому
батько
коміт
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
 	**/
 	public static function getClassName( c : Class ) : String {
+		if( c == null )
+			return null;
 		#if flash9
 			return untyped __global__["flash.utils.getQualifiedClassName"](c);
 		#else true