Commit 7c915af4 authored by Theodore Dubois's avatar Theodore Dubois Committed by Alexandre Julliard

shell32: Avoid closing the caller's key.

parent 2a7c4ea8
......@@ -259,7 +259,9 @@ static HRESULT WINAPI IQueryAssociations_fnInit(
}
else if (hkeyProgid != NULL)
{
This->hkeySource = This->hkeyProgID = hkeyProgid;
/* reopen the key so we don't end up closing a key owned by the caller */
RegOpenKeyExW(hkeyProgid, NULL, 0, KEY_READ, &This->hkeyProgID);
This->hkeySource = This->hkeyProgID;
return S_OK;
}
else
......
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