Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] NPE in Glyph.java

Hi,

I was implementing my own legend (because I don't like the poygons/arcs of the current Glyph.polygon(Rule) :-( and came across an NPE:

Exception in thread "main" java.lang.NullPointerException
	at net.refractions.udig.ui.graphics.Glyph$8.getImageData(Glyph.java:474)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:273) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:227)

Though this was in udig 1.1, the trunk is the same:

} catch(RuntimeException ex){
    if(image != null && !image[0].isDisposed()) {
        image[0].dispose();
    }
    throw ex;
}

Looks like a typo and I think it should read

if(image[0] != null && !image[0].isDisposed()) {

Cheers,

Ugo

--
Ugo Taddei

Fraunhofer Institut Intelligente Analyse- und Informationssysteme (FhG IAIS)
http://www.iais.fraunhofer.de
Department Knowledge Discovery - IAIS.KD -
Working Group Spatial Decision Support
http://www.iais.fraunhofer.de/kd.html
phone  (+49)2241-14-2184    fax    (+49)2241-14-2072
Schloss Birlinghoven, D-53754 Sankt Augustin, Germany


Back to the top