summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/util/utl_scope.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/util/utl_scope.cpp')
-rw-r--r--TAO/TAO_IDL/util/utl_scope.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp
index 6a909093d90..f8b25ec0f32 100644
--- a/TAO/TAO_IDL/util/utl_scope.cpp
+++ b/TAO/TAO_IDL/util/utl_scope.cpp
@@ -1215,8 +1215,14 @@ UTL_Scope::lookup_by_name (UTL_ScopedName *e,
const bool global_scope_name = work->is_global_name (name);
if (global_scope_name)
{
+ // No tail, exit directly
+ UTL_List* tail = e->tail ();
+ if (!tail)
+ {
+ return 0;
+ }
// Remove the preceeding "::" or "" from the scopename
- e = static_cast<UTL_ScopedName *> (e->tail ());
+ e = static_cast<UTL_ScopedName *> (tail);
name = e->head ();
// Move directly to the root scope