diff core/src/luan/impl/IndexExpr.java @ 407:7fd9f1b7b878

replace LuanPropertyTable with LuanPropertyMeta
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 29 Apr 2015 13:01:00 -0600
parents 3e68917a0dc6
children 8fbb961aabd5
line wrap: on
line diff
--- a/core/src/luan/impl/IndexExpr.java	Wed Apr 29 11:24:00 2015 -0600
+++ b/core/src/luan/impl/IndexExpr.java	Wed Apr 29 13:01:00 2015 -0600
@@ -44,9 +44,11 @@
 			return StringLuan.__index(luan,(String)obj,key);
 		if( obj instanceof byte[] )
 			return BinaryLuan.__index(luan,(byte[])obj,key);
-		Object value = JavaLuan.__index(luan,obj,key);
-		if( value != null )
-			return value;
+		if( obj != null ) {
+			Object value = JavaLuan.__index(luan,obj,key);
+			if( value != null )
+				return value;
+		}
 		throw luan.bit(op1.se()).exception( "attempt to index '"+op1.se().text()+"' (a " + Luan.type(obj) + " value)" );
 	}
 }