Fixed allocation size warning.

This commit is contained in:
Armin Novak 2014-11-16 23:42:30 +01:00
parent 28220d5b9f
commit d225b97078
1 changed files with 3 additions and 1 deletions

View File

@ -222,7 +222,9 @@ void* BufferPool_Take(wBufferPool* pool, int size)
if (!found)
{
if (pool->alignment)
if (!size)
buffer = NULL;
else if (pool->alignment)
buffer = _aligned_malloc(size, pool->alignment);
else
buffer = malloc(size);