Skip to content

Commit b4d7648

Browse files
committed
Pointers support 'nil' assignment.
1 parent 35e56ad commit b4d7648

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

luad/stack.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ T getValue(T, alias typeMismatchHandler = defaultTypeMismatch)(lua_State* L, int
243243
enum expectedType = luaTypeOf!T;
244244

245245
//if a class reference, return null for nil values
246-
static if(is(T : const(Object)))
246+
static if(is(T : const(Object)) || isPointer!T)
247247
{
248248
if(type == LuaType.Nil)
249249
return null;

0 commit comments

Comments
 (0)