From 4eb27a8795fcb5b24249ade65547df99f6435bb6 Mon Sep 17 00:00:00 2001 From: matto Date: Sun, 30 Aug 2015 18:15:16 -0400 Subject: [PATCH] Adding assert on malloc We do this in other places and I think it's good behaviour for the exceptional occasion that we cannot allocate memory. --- src/Textures.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Textures.cpp b/src/Textures.cpp index 232e1642..234b3fb4 100644 --- a/src/Textures.cpp +++ b/src/Textures.cpp @@ -999,6 +999,7 @@ void TextureCache::_load(u32 _tile, CachedTexture *_pTexture) } pDest = (u32*)malloc(_pTexture->textureBytes); + assert(pDest != NULL); GLint mipLevel = 0, maxLevel = 0; #ifndef GLES2