made CL_ExpandEntities cause an error if called before cl_entities is initialized
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Apr 2005 20:01:33 +0000 (20:01 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Apr 2005 20:01:33 +0000 (20:01 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5159 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c

index f989713..e463e8e 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -169,6 +169,8 @@ void CL_ExpandEntities(int num)
        entity_t *oldentities;
        if (num >= cl_max_entities)
        {
+               if (!cl_entities)
+                       Host_Error("CL_ExpandEntities: cl_entities not initialized\n");
                if (num >= MAX_EDICTS)
                        Host_Error("CL_ExpandEntities: num %i >= %i\n", num, MAX_EDICTS);
                oldmaxentities = cl_max_entities;