Skip to content

Instantly share code, notes, and snippets.

@dscho dscho/gist:1434511
Created Dec 5, 2011

Embed
What would you like to do?
java.lang.NullPointerException
at imagej.legacy.translate.LegacyUtils.dimensionsIJ1Compatible(LegacyUtils.java:121)
at imagej.legacy.plugin.LegacyPlugin.isLegacyCompatible(LegacyPlugin.java:306)
at imagej.legacy.plugin.LegacyPlugin.run(LegacyPlugin.java:106)
at imagej.ext.plugin.PluginModule.run(PluginModule.java:148)
at imagej.ext.module.ModuleRunner.run(ModuleRunner.java:148)
at imagej.ext.module.ModuleRunner.call(ModuleRunner.java:118)
at imagej.ext.module.ModuleRunner.call(ModuleRunner.java:65)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
diff --git a/core/legacy/src/main/java/imagej/legacy/plugin/LegacyPlugin.java b/core/legacy/src/main/java/imagej/legacy/plugin/LegacyPlugin.java
index 9ebed10..cafa1b9 100644
--- a/core/legacy/src/main/java/imagej/legacy/plugin/LegacyPlugin.java
+++ b/core/legacy/src/main/java/imagej/legacy/plugin/LegacyPlugin.java
@@ -103,7 +103,7 @@ public void run() {
final ImageDisplay activeDisplay =
imageDisplayService.getActiveImageDisplay();
- if (!isLegacyCompatible(activeDisplay)) {
+ if (activeDisplay != null && !isLegacyCompatible(activeDisplay)) {
final String err =
"The active dataset is too large to be represented inside IJ1.";
Log.error(err);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.