瀏覽代碼

protect against recursion bug

David Rose 24 年之前
父節點
當前提交
e8211cbd38
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      dtool/src/dconfig/notify.cxx

+ 5 - 0
dtool/src/dconfig/notify.cxx

@@ -248,6 +248,11 @@ get_top_category() {
 ////////////////////////////////////////////////////////////////////
 NotifyCategory *Notify::
 get_category(const string &basename, NotifyCategory *parent_category) {
+  // We have to ensure that config_notify has been at least created
+  // before we try to create any NotifyCategories, or we'll get an
+  // infinite recursion problem.  Calling this function is sufficient.
+  config_notify.AmInitializing();
+
   // The string should not contain colons.
   nassertr(basename.find(':') == string::npos, NULL);