- fixed potential NPE
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / element / UriWithLabelElement.java
index a4309ae9e46fbdd4f7d6dad6f254c4804da4bf28..8e1ff192767b343711416e1917b66bb5d26238a7 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -36,18 +36,21 @@ public class UriWithLabelElement extends TextWithLabelElement {
                super(formFactory, parentElement, labelString, null, textHeight, style);
                setUri(initialUri);
        }
-       
+
        /**
-        * 
+        *
         */
        public void setUri(URI uri) {
                if(uri != null){
                        super.setText(uri.toString());
                }
        }
-       
+
        public URI getUri() throws URISyntaxException{
-               return new URI(super.getText());
+           if(super.getText()!=null){
+               return new URI(super.getText());
+           }
+           return null;
        }
-       
+
 }