This commit is contained in:
J.D. Purcell 2017-04-04 23:45:52 -04:00
parent 9bb4cc9917
commit 98c1ccab4d
1 changed files with 4 additions and 9 deletions

View File

@ -149,16 +149,11 @@ namespace BizHawk.Client.Common
size = Math.Min(size, _memoryLimit);
// if we have an appropriate buffer free, return it
if (_rewindBufferBacking != null)
var buf = _rewindBufferBacking;
_rewindBufferBacking = null;
if (buf != null && buf.LongLength == size)
{
var buf = _rewindBufferBacking;
_rewindBufferBacking = null;
if (buf.LongLength == size)
{
return buf;
}
return buf;
}
// otherwise, allocate it