Skip to content
Snippets Groups Projects
Commit 30268cf0 authored by Stephane Dallongeville's avatar Stephane Dallongeville
Browse files

fixed possible NPE

parent 4999c1f3
No related branches found
No related tags found
No related merge requests found
......@@ -553,7 +553,7 @@ public class WorkFlowContainer extends JLayeredPane implements WorkFlowListener,
}
MainFrame.pasteSelection(embed, true);
workFlow.addBlock(embed.getBlockDescriptor());
}
......@@ -584,6 +584,9 @@ public class WorkFlowContainer extends JLayeredPane implements WorkFlowListener,
public BlockPanel getBlockPanel(BlockDescriptor blockInfo)
{
if (blockInfo == null)
return null;
if (blockInfo.getBlock() == workFlow)
return getParentPanel();
......
......@@ -311,6 +311,9 @@ public class WorkFlowPanel extends BlockPanel implements VarVisibilityListener
{
final BlockPanel ownerPanel = innerFlowPane.getBlockPanel(innerBlock);
if (ownerPanel == null)
return;
exposingLinks.put(variable, new RoundedSquareLine(WorkFlowPanel.this, ownerPanel, variable)
{
@Override
......@@ -375,6 +378,9 @@ public class WorkFlowPanel extends BlockPanel implements VarVisibilityListener
{
final BlockPanel ownerPanel = innerFlowPane.getBlockPanel(innerBlock);
if (ownerPanel == null)
return;
exposingLinks.put(variable, new RoundedSquareLine(ownerPanel, WorkFlowPanel.this, variable)
{
@Override
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment