Merge DMD r310: bugzilla 3645 manifest constant (enum) crashes dmd

---
 dmd/interpret.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
This commit is contained in:
Leandro Lucarella
2010-01-06 15:18:22 -03:00
parent 4d74a325fc
commit 3fc72b7ec3

View File

@@ -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];