summaryrefslogtreecommitdiff
path: root/java/src/IceGridGUI/Application/Node.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/IceGridGUI/Application/Node.java')
-rwxr-xr-xjava/src/IceGridGUI/Application/Node.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/java/src/IceGridGUI/Application/Node.java b/java/src/IceGridGUI/Application/Node.java
index b413385fd1d..f264ccc4b37 100755
--- a/java/src/IceGridGUI/Application/Node.java
+++ b/java/src/IceGridGUI/Application/Node.java
@@ -1261,9 +1261,7 @@ class Node extends TreeNode implements PropertySetParent
if(t == null)
{
- t = (ServerTemplate)root.getServerTemplates().getChildAt(0);
-
- if(t == null)
+ if(root.getServerTemplates().getChildCount() == 0)
{
JOptionPane.showMessageDialog(
getCoordinator().getMainFrame(),
@@ -1272,11 +1270,10 @@ class Node extends TreeNode implements PropertySetParent
JOptionPane.INFORMATION_MESSAGE);
return;
}
- else
- {
- descriptor.template = t.getId();
- descriptor.parameterValues = new java.util.HashMap();
- }
+
+ t = (ServerTemplate)root.getServerTemplates().getChildAt(0);
+ descriptor.template = t.getId();
+ descriptor.parameterValues = new java.util.HashMap();
}
ServerInstance server = new ServerInstance(this, id, descriptor);