Create a grid.
Change it subgrid colour.
Select the grid creator.
Undo to the beginning.
Redo -> NPE
This happens the other type of shape as well. No crash if the grid editing mode is not selected at the end.
java.lang.NullPointerException
at net.sf.latexdraw.instruments.Border.update(Border.java:165)
at net.sf.latexdraw.mapping.Shape2BorderMapping.onObjectModified(Shape2BorderMapping.java:37)
at org.malai.mapping.MappingRegistry.onObjectModified(MappingRegistry.java:301)
at net.sf.latexdraw.glib.models.impl.LShape.setModified(LShape.java:1084)
at net.sf.latexdraw.glib.models.impl.LGroup.setModified(LGroup.java:1236)
at net.sf.latexdraw.actions.AddShape.doActionBody(AddShape.java:38)
at net.sf.latexdraw.actions.AddShape.redo(AddShape.java:56)
at org.malai.undo.UndoCollector.redo(UndoCollector.java:152)
at org.malai.action.library.Redo.doActionBody(Redo.java:51)
at org.malai.action.Action.doIt(Action.java:83)
at org.malai.instrument.Link.interactionStops(Link.java:248)
at org.malai.interaction.Interaction.notifyHandlersOnStop(Interaction.java:201)
at org.malai.interaction.Interaction.onTerminating(Interaction.java:751)
at org.malai.interaction.TerminalState.onIngoing(TerminalState.java:35)
at org.malai.interaction.Interaction.executeTransition(Interaction.java:287)
at org.malai.interaction.Interaction.checkTransition(Interaction.java:316)
at org.malai.interaction.Interaction.onButtonPressed(Interaction.java:386)
at org.malai.interaction.SwingEventManager.actionPerformed(SwingEventManager.java:302)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6290)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6055)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4653)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2482)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:621)
at java.awt.EventQueue$2.run(EventQueue.java:619)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)