summaryrefslogtreecommitdiff
path: root/java/src/IceGridGUI/Application/Node.java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2011-03-28 18:32:25 -0400
committerBernard Normier <bernard@zeroc.com>2011-03-28 18:32:25 -0400
commit7ab21a7df484b0186cca1c7f5dc931c016cbe4de (patch)
treeaafe7e530246b75adac36d3eacf54b45c2bb3452 /java/src/IceGridGUI/Application/Node.java
parent5004 - Slice file UTF-8 BOM and #define (diff)
downloadice-7ab21a7df484b0186cca1c7f5dc931c016cbe4de.tar.bz2
ice-7ab21a7df484b0186cca1c7f5dc931c016cbe4de.tar.xz
ice-7ab21a7df484b0186cca1c7f5dc931c016cbe4de.zip
Fixed NPE when loading bad XML file (bug #4859)
Diffstat (limited to 'java/src/IceGridGUI/Application/Node.java')
-rw-r--r--java/src/IceGridGUI/Application/Node.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/IceGridGUI/Application/Node.java b/java/src/IceGridGUI/Application/Node.java
index 61186757b72..a40ea616724 100644
--- a/java/src/IceGridGUI/Application/Node.java
+++ b/java/src/IceGridGUI/Application/Node.java
@@ -542,8 +542,12 @@ class Node extends TreeNode implements PropertySetParent
//
TemplateDescriptor templateDescriptor = root.findServerTemplateDescriptor(instanceDescriptor.template);
- assert templateDescriptor != null;
-
+ if(templateDescriptor == null)
+ {
+ throw new UpdateFailedException("Cannot find template descriptor '" +
+ instanceDescriptor.template +
+ "' referenced by server-instance");
+ }
ServerDescriptor serverDescriptor = (ServerDescriptor)templateDescriptor.descriptor;
assert serverDescriptor != null;