From df5874774dc7d34990a70b6fd53d7ead2c316ba6 Mon Sep 17 00:00:00 2001 From: kpouer Date: Thu, 7 Aug 2003 13:29:55 +0000 Subject: [PATCH] a small bugfix --- .../internal/compiler/ast/ReturnStatement.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java index a30be75..13822d7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java @@ -1,7 +1,5 @@ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage; - import java.util.List; import java.util.ArrayList; @@ -39,6 +37,9 @@ public class ReturnStatement extends Statement { * @return the variables modified */ public List getModifiedVariable() { + if (expression == null) { + return new ArrayList(); + } return expression.getModifiedVariable(); } @@ -47,6 +48,9 @@ public class ReturnStatement extends Statement { * @return the variables used */ public List getUsedVariable() { + if (expression == null) { + return new ArrayList(); + } return expression.getUsedVariable(); } } -- 1.7.1