Check for null primary linker, which is a bonehead error condition but requires a graceful message.
Issues: 3536
Review by: scottb
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5379 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java b/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
index 424fb28..2100ce0 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java
@@ -171,7 +171,13 @@
}
// Get the primary linker.
- sortedLinkers.add(module.getActivePrimaryLinker());
+ Class<? extends Linker> primary = module.getActivePrimaryLinker();
+ if (primary == null) {
+ logger.log(logger.ERROR, "Primary linker is null. Does your module " +
+ "inherit from com.google.gwt.core.Core or com.google.gwt.user.User?");
+ } else {
+ sortedLinkers.add(module.getActivePrimaryLinker());
+ }
// Get all the post-linkers IN REVERSE ORDER.
{