From 3fc72b7ec3437cc6d95c76f7d3562113365a5e5c Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Wed, 6 Jan 2010 15:18:22 -0300 Subject: [PATCH] Merge DMD r310: bugzilla 3645 manifest constant (enum) crashes dmd --- dmd/interpret.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) --- dmd/interpret.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dmd/interpret.c b/dmd/interpret.c index caa97836..903309dd 100644 --- a/dmd/interpret.c +++ b/dmd/interpret.c @@ -228,7 +228,8 @@ Expression *FuncDeclaration::interpret(InterState *istate, Expressions *argument } } // Don't restore the value of 'this' upon function return - if (needThis() && thisarg->op==TOKvar) { + if (needThis() && thisarg->op == TOKvar && istate) + { VarDeclaration *thisvar = ((VarExp *)(thisarg))->var->isVarDeclaration(); for (size_t i = 0; i < istate->vars.dim; i++) { VarDeclaration *v = (VarDeclaration *)istate->vars.data[i];