mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
add null protection
This commit is contained in:
@@ -461,7 +461,7 @@ public class StatusBar extends JPanel implements IPlugIn {
|
||||
statusText = "<html>Selection: " + builder.toString() + "</html>";
|
||||
}
|
||||
} else {
|
||||
if (forceInstatiate)
|
||||
if (forceInstatiate != null && forceInstatiate)
|
||||
statusText = "<html>Drag the mouse over the canvas to place a new <font color='blue'>" + componentSlot.getName()
|
||||
+ "</font></html>";
|
||||
else
|
||||
|
||||
@@ -51,7 +51,7 @@ class TreeGestureListener implements DragGestureListener {
|
||||
if (path != null && path.getLastPathComponent() instanceof DefaultMutableTreeNode) {
|
||||
DefaultMutableTreeNode leaf = (DefaultMutableTreeNode)path.getLastPathComponent();
|
||||
Payload payload = (Payload) leaf.getUserObject();
|
||||
if (payload != null) {
|
||||
if (payload != null && (payload.getComponentType() != null || payload.getClickListener() != null)) {
|
||||
if (payload.getComponentType() != null)
|
||||
presenter.setNewComponentTypeSlot(payload.getComponentType(), null, true);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user