Fix a NULL crash when creating a sound without a worldmodel (harmless
NULL, but exploitable by svc_disconnect svc_sound in a single packet).
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12204
d7cf8633-e32d-0410-b094-
e92efae38249
::stable-branch::merge=
cbde965110707cc49397a357dddec84c8f38493d
++numdownloads_added;
}
+ if (curl_mutex) Thread_UnlockMutex(curl_mutex);
return false;
}
}
}
}
+ if (curl_mutex) Thread_UnlockMutex(curl_mutex);
return false;
}
else
if (snd_spatialization_occlusion.integer)
{
if(snd_spatialization_occlusion.integer & 1)
- if(listener_pvs)
+ if(listener_pvs && cl.worldmodel)
{
int cluster = cl.worldmodel->brush.PointInLeaf(cl.worldmodel, ch->origin)->clusterindex;
if(cluster >= 0 && cluster < 8 * listener_pvsbytes && !CHECKPVSBIT(listener_pvs, cluster))