Browse Source

Don't include itself as a namespace without prefix. Fix issue #93

git-svn-id: https://klish.googlecode.com/svn/trunk@545 0eaa4687-2ee9-07dd-09d9-bcdd2d2dd5fb
Serj Kalichev 12 years ago
parent
commit
1eca04d051
1 changed files with 3 additions and 0 deletions
  1. 3 0
      clish/shell/shell_tinyxml.cpp

+ 3 - 0
clish/shell/shell_tinyxml.cpp

@@ -559,6 +559,9 @@ process_namespace(clish_shell_t * shell, TiXmlElement * element, void *parent)
 	clish_view_t *ref_view = clish_shell_find_create_view(shell,
 		view, NULL);
 	assert(ref_view);
+	/* Don't include itself without prefix */
+	if ((ref_view == v) && !prefix)
+		return;
 	nspace = clish_nspace_new(ref_view);
 	assert(nspace);
 	clish_view_insert_nspace(v, nspace);