diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index bfef4a23d7c..4d775b4defb 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -1036,9 +1036,10 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next( /* * Read the entry from the storage. */ - StorageBaseImpl_ReadDirEntry(This->parentStorage, + hr = StorageBaseImpl_ReadDirEntry(This->parentStorage, currentSearchNode, ¤tEntry); + if (FAILED(hr)) break; /* * Copy the information to the return buffer.