Commit 4aee9ba5 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

dmloader: Stop after find first matching object.

This stops a crash in Legoland on startup when finding cached objects. Placing a break in each of the if's causes the wrong object to be loaded. The help states it looks at each type in order. So, we might have to loop the cache multiple times to ensure that when an object has flag DMUS_OBJ_OBJECT, it's preferred over a DMUS_OBJ_FILENAME | DMUS_OBJ_FULLPATH match. Signed-off-by: 's avatarAlistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: 's avatarMichael Stefaniuc <mstefani@winehq.org> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent b909b2c5
......@@ -208,6 +208,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_GetObject(IDirectMusicLoader8 *ifac
TRACE(": not loaded yet\n");
pObjectEntry = pExistingEntry;
}
break;
}
else if ((pDesc->dwValidData & (DMUS_OBJ_FILENAME | DMUS_OBJ_FULLPATH)) &&
(pExistingEntry->Desc.dwValidData & (DMUS_OBJ_FILENAME | DMUS_OBJ_FULLPATH)) &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment