diff --git a/dlls/windowscodecs/stream.c b/dlls/windowscodecs/stream.c index 24eaf87feed..bd5592b9f30 100644 --- a/dlls/windowscodecs/stream.c +++ b/dlls/windowscodecs/stream.c @@ -125,11 +125,9 @@ static HRESULT WINAPI StreamOnMemory_Write(IStream *iface, hr = STG_E_MEDIUMFULL; } else { - if (cb) { - memcpy(This->pbMemory + This->dwCurPos, pv, cb); - This->dwCurPos += cb; - hr = S_OK; - } + memcpy(This->pbMemory + This->dwCurPos, pv, cb); + This->dwCurPos += cb; + hr = S_OK; if (pcbWritten) *pcbWritten = cb; } LeaveCriticalSection(&This->lock);