From: havoc Date: Wed, 25 Jul 2012 07:45:10 +0000 (+0000) Subject: fix an infinite loop if an engine cvar is being restored, that did not X-Git-Tag: xonotic-v0.7.0~118 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6185fdc53522c4688d814a4c7c7fd51529f2ce04;p=xonotic%2Fdarkplaces.git fix an infinite loop if an engine cvar is being restored, that did not 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 --- diff --git a/cvar.c b/cvar.c index 521e2842..b88aafd0 100644 --- 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