Browse Source

Merge branch 'development' of https://github.com/HaxeFoundation/haxe into development

Simon Krajewski 12 years ago
parent
commit
7077a0f013
1 changed files with 2 additions and 1 deletions
  1. 2 1
      std/haxe/macro/Context.hx

+ 2 - 1
std/haxe/macro/Context.hx

@@ -168,7 +168,8 @@ class Context {
 		The default value is `"1"`.
 	**/
 	public static function definedValue( key : String ) : String {
-		return new String(load("defined_value", 1)(untyped key.__s));
+		var d = load("defined_value", 1)(untyped key.__s);
+		return d == null ? null : new String(d);
 	}
 
 	/**