Browse Source

*** empty log message ***

David Rose 24 years ago
parent
commit
0fe9f783e0
1 changed files with 5 additions and 2 deletions
  1. 5 2
      dtool/src/cppparser/cppScope.cxx

+ 5 - 2
dtool/src/cppparser/cppScope.cxx

@@ -826,11 +826,14 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst,
   bool anything_changed = false;
   bool anything_changed = false;
 
 
   if (_struct_type != NULL) {
   if (_struct_type != NULL) {
+    CPPScope *native_scope = (CPPScope *)NULL;
+    if (_struct_type->_ident != (CPPIdentifier *)NULL) {
+      native_scope = _struct_type->_ident->_native_scope;
+    }
     to_scope->_struct_type = 
     to_scope->_struct_type = 
       new CPPStructType(_struct_type->_type, 
       new CPPStructType(_struct_type->_type, 
 			new CPPIdentifier(to_scope->_name),
 			new CPPIdentifier(to_scope->_name),
-			_struct_type->_ident->_native_scope,
-			to_scope, _struct_type->_file);
+			native_scope, to_scope, _struct_type->_file);
     to_scope->_struct_type->_incomplete = false;
     to_scope->_struct_type->_incomplete = false;
 
 
     // Copy the derivation to the new type.
     // Copy the derivation to the new type.