Crash fix

git-svn-id: https://svn.eduke32.com/eduke32@4905 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2015-01-12 01:53:55 +00:00
parent 419ea3ed40
commit 130244a302

View file

@ -455,10 +455,15 @@ int32_t removesearchpath(const char *p)
void removesearchpaths_withuser(int32_t usermask)
{
for (searchpath_t *srch = searchpathhead; srch; srch = srch->next)
searchpath_t *next;
for (searchpath_t *srch = searchpathhead; srch; srch = next)
{
next = srch->next;
if (srch->user & usermask)
{
if (srch == searchpathhead)
searchpathhead = srch->next;
else