From e55aa3d98bd027f810d639bef1f6d4bb047fc643 Mon Sep 17 00:00:00 2001 From: Stephane Dallongeville <stephane.dallongeville@pasteur.fr> Date: Fri, 5 May 2023 12:19:05 +0200 Subject: [PATCH] small NPE fix --- .../nherve/colorpickerthreshold/ColorPickerThreshold.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/plugins/nherve/colorpickerthreshold/ColorPickerThreshold.java b/src/main/java/plugins/nherve/colorpickerthreshold/ColorPickerThreshold.java index 8523b9b..19f5a2b 100644 --- a/src/main/java/plugins/nherve/colorpickerthreshold/ColorPickerThreshold.java +++ b/src/main/java/plugins/nherve/colorpickerthreshold/ColorPickerThreshold.java @@ -499,7 +499,7 @@ public class ColorPickerThreshold extends PainterManagerSingletonPlugin<ColorPic private int[] getClickedColor(Point pt) throws SignatureException { IcyBufferedImage image = getCurrentSequence().getFirstImage(); int[] c = null; - if (image.isInside(pt)) { + if ((image != null) && image.isInside(pt)) { int x = (int) pt.getX(); int y = (int) pt.getY(); c = ColorSpaceTools.getColorComponentsI_0_255(image, ColorSpaceTools.RGB, x, y); -- GitLab