diff options
author | Bernard Normier <bernard@zeroc.com> | 2011-03-28 18:32:25 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2011-03-28 18:32:25 -0400 |
commit | 7ab21a7df484b0186cca1c7f5dc931c016cbe4de (patch) | |
tree | aafe7e530246b75adac36d3eacf54b45c2bb3452 /java/src/IceGridGUI/Application/Node.java | |
parent | 5004 - Slice file UTF-8 BOM and #define (diff) | |
download | ice-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.java | 8 |
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; |