Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.0.5
-
Component/s: API
-
Labels:None
-
Environment:- Windows 7 64bit
- JDK/JRE 7 update 51
-
ICEsoft Forum Reference:
-
Workaround Exists:Yes
-
Workaround Description:See the referenced forum thread.
Description
controller.setToolBarVisible()
When loading a PDF file, if I change the visibility of the toolbar using this method, I will get a NullPointerException.
java.lang.NullPointerException
at org.icepdf.core.pobjects.Document.getPageTree(Document.java:1204)
at org.icepdf.ri.common.SwingController.getPageTree(SwingController.java:3232)
at org.icepdf.ri.common.SwingController.reflectStateInComponents(SwingController.java:1046)
at org.icepdf.ri.common.SwingController.setToolBarVisible(SwingController.java:2806)
When loading a PDF file, if I change the visibility of the toolbar using this method, I will get a NullPointerException.
java.lang.NullPointerException
at org.icepdf.core.pobjects.Document.getPageTree(Document.java:1204)
at org.icepdf.ri.common.SwingController.getPageTree(SwingController.java:3232)
at org.icepdf.ri.common.SwingController.reflectStateInComponents(SwingController.java:1046)
at org.icepdf.ri.common.SwingController.setToolBarVisible(SwingController.java:2806)
I've added some code protection in the Document class as well as the Swing Controller. Should help avoid this issue in the future.