summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sources/scalac/Global.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java
index 31c5c173af..c97882d440 100644
--- a/sources/scalac/Global.java
+++ b/sources/scalac/Global.java
@@ -424,11 +424,11 @@ public abstract class Global {
* @param args - arguments to the attribute constructor
*/
public void addAttribute(Symbol sym, Symbol aSym, AConstant[] args) {
- if(aSym.isNone() || aSym.isError())
- return;
- AttributeInfo attr = getAttributes(sym);
- attr = new AttributeInfo(aSym, args, attr);
- setAttribute(sym, attr);
+ if (aSym != null && ! (aSym.isNone() || aSym.isError())) {
+ AttributeInfo attr = getAttributes(sym);
+ attr = new AttributeInfo(aSym, args, attr);
+ setAttribute(sym, attr);
+ }
}
/** Add attribute with no arguments