NullPointerException in Image Math plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

NullPointerException in Image Math plugin

Maier, Lorenz
Dear all,

I found a NullPointerException in ij.plugin.filter.ImageMath, which occured to me when I used the "Macro..." macro of Image Math in batch mode.

It is located at line 128 of ImageMath.java, when gd.getPreviewCheckbox().getState() is executed, but there is no PreviewCheckbox in the Dialog.

A small change was enough as a workaround:

boolean previewing() {
                return gd!=null && gd.getPreviewCheckbox()!=null && gd.getPreviewCheckbox().getState();
}

Best regards,
Lorenz


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html