When I'm trying to draw a polygon I get a NullPointerException
.
This is how I am trying to do it:
Roi roi = imp.getRoi();
Polygon p = roi.getPolygon();
Graphics g=null;
g.drawPolygon(p.xpoints, p.ypoints, p.npoints);
Please suggest how I can fix this.