]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
add a couple Mem_CheckSentinelsGlobal calls to loadimagepixels when developer_memoryd...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 Jul 2003 16:35:40 +0000 (16:35 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 Jul 2003 16:35:40 +0000 (16:35 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3305 d7cf8633-e32d-0410-b094-e92efae38249

image.c

diff --git a/image.c b/image.c
index cf6efab62efab753394587b5baa717a049c7ea21..c84b86323e1620bf09c112a1ef4eeccd0d94469f 100644 (file)
--- a/image.c
+++ b/image.c
@@ -604,6 +604,8 @@ qbyte *loadimagepixels (const char *filename, qboolean complain, int matchwidth,
        int i;
        qbyte *f, *data = NULL;
        char basename[MAX_QPATH], name[MAX_QPATH], *c;
+       if (developer_memorydebug.integer)
+               Mem_CheckSentinelsGlobal();
        Image_StripImageExtension(filename, basename); // strip filename extensions to allow replacement by other types
        // replace *'s with #, so commandline utils don't get confused when dealing with the external files
        for (c = basename;*c;c++)
@@ -616,6 +618,8 @@ qbyte *loadimagepixels (const char *filename, qboolean complain, int matchwidth,
                {
                        Mem_Free(f);
                        Con_DPrintf("loaded image %s (%dx%d)\n", name, image_width, image_height);
+                       if (developer_memorydebug.integer)
+                               Mem_CheckSentinelsGlobal();
                        return data;
                }
        }
@@ -628,6 +632,8 @@ qbyte *loadimagepixels (const char *filename, qboolean complain, int matchwidth,
                        Con_Printf (i == 0 ? "\"%s\"" : (imageformats[i+1].formatstring ? ", \"%s\"" : " or \"%s\".\n"), imageformats[i].formatstring);
                }
        }
+       if (developer_memorydebug.integer)
+               Mem_CheckSentinelsGlobal();
        return NULL;
 }