Affects Version/s: 1.7
Fix Version/s: None
Component/s: SVG Viewer
Environment:Operating System: Windows XP
Starting at line 299 in org.apache.batik.apps.svgbrowser.Main() is the following code:
JSVGViewerFrame relativeTo =
: (JSVGViewerFrame) viewerFrames.get(0);
AboutDialog dlg = new AboutDialog(relativeTo);
// Work around pack() bug on some platforms
relativeTo may be set to null. This will later get passed do setLocationRelativeTo(). In AboutDlg's overridden version of this method the parameter is unconditionally dereferenced, which could cause a null pointer exception.
AboutDlg.setLocationRelativeTo() should probably be changed to accept a null value to maintain the contract set by AboutDlg's parent JWindow.
This was detected by FindBugs.