Browse Source

prevent crash, return sensible value from find_type()

David Rose 18 years ago
parent
commit
f89ef1f257
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dtool/src/dtoolbase/typeRegistry.cxx

+ 1 - 1
dtool/src/dtoolbase/typeRegistry.cxx

@@ -229,7 +229,7 @@ TypeHandle TypeRegistry::
 find_type(const string &name) const {
 find_type(const string &name) const {
   _lock->lock();
   _lock->lock();
 
 
-  TypeHandle handle;
+  TypeHandle handle = TypeHandle::none();
   NameRegistry::const_iterator ri;
   NameRegistry::const_iterator ri;
   ri = _name_registry.find(name);
   ri = _name_registry.find(name);
   if (ri != _name_registry.end()) {
   if (ri != _name_registry.end()) {