From e8211cbd38692f7b81ea1db03052ccda711966e8 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 13 Jun 2001 18:05:03 +0000 Subject: [PATCH] protect against recursion bug --- dtool/src/dconfig/notify.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dtool/src/dconfig/notify.cxx b/dtool/src/dconfig/notify.cxx index 58c56f2df6..8b9af791fe 100644 --- a/dtool/src/dconfig/notify.cxx +++ b/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);