Bug 44703 - Potential null pointer dereference in apps.svgbrowser.FindDialog.getNext()
Summary: Potential null pointer dereference in apps.svgbrowser.FindDialog.getNext()
Status: NEW
Alias: None
Product: Batik - Now in Jira
Classification: Unclassified
Component: SVG Viewer (show other bugs)
Version: 1.7
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Batik Developer's Mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-28 15:44 UTC by David Dillard
Modified: 2008-03-28 15:44 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Dillard 2008-03-28 15:44:28 UTC
org.apache.batik.apps.svgbrowser.FindDialog.getNext() starts with the following:

    protected GraphicsNode getNext(String text) {
        if (walker == null && gvtRoot != null) {
            walker = new GVTTreeWalker(gvtRoot);
        }
        GraphicsNode gn = walker.getCurrentGraphicsNode();

When the method is entered if walker is null and gvtRoot is null then a GVTTreeWalker object will not be allocated and the an null pointer exception will be thrown.


This was detected by FindBugs.