]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix an infinite loop if an engine cvar is being restored, that did not
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 25 Jul 2012 07:45:10 +0000 (07:45 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 25 Jul 2012 08:24:21 +0000 (10:24 +0200)
exist at init (but it still warns about it), thanks to Omega for
debugging this

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11836 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=0715559d85076730188002d9e207210b4bdc35fd

cvar.c

diff --git a/cvar.c b/cvar.c
index 521e2842ab3e0e93377555c3e38c182f031ce32c..b88aafd0374d761bb47dd97697fb40f44f729feb 100644 (file)
--- a/cvar.c
+++ b/cvar.c
@@ -747,6 +747,7 @@ void Cvar_RestoreInitState(void)
                        if (!(c->flags & CVAR_ALLOCATED))
                        {
                                Con_DPrintf("Cvar_RestoreInitState: Unable to destroy cvar \"%s\", it was registered after init!\n", c->name);
+                               cp = &c->next;
                                continue;
                        }
                        // remove this cvar, it did not exist at init