Browse Source

Add assertion in a case where I've seen an occasional crash

rdb 11 years ago
parent
commit
3070f18c24
1 changed files with 4 additions and 0 deletions
  1. 4 0
      dtool/src/interrogate/interrogateBuilder.cxx

+ 4 - 0
dtool/src/interrogate/interrogateBuilder.cxx

@@ -1679,6 +1679,10 @@ get_function(CPPInstance *function, string description,
     InterrogateFunction &ifunction =
       InterrogateDatabase::get_ptr()->update_function(index);
 
+    // Not 100% sure why, but there's a case where this happens,
+    // in a case where a typedef shadowed an actual type. ~rdb
+    nassertr(&ifunction != NULL, 0);
+
     ifunction._flags |= flags;
 
     // Also, make sure this particular signature is defined.