Prevent potential Explorer crash

Fixes #1523
This commit is contained in:
ge0rdi
2023-04-08 17:22:19 +02:00
parent bcc76dd6ab
commit 2130047bd6

View File

@@ -64,6 +64,9 @@ LRESULT CALLBACK CExplorerBHO::SubclassTreeParentProc( HWND hWnd, UINT uMsg, WPA
// - change the tree styles to achieve different looks
LRESULT CALLBACK CExplorerBHO::SubclassTreeProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData )
{
if (GetTlsData()->bho == NULL)
return DefSubclassProc(hWnd, uMsg, wParam, lParam);
if (uMsg==TVM_ENSUREVISIBLE && (dwRefData&1))
{
// HACK! there is a bug in Win7 Explorer and when the selected folder is expanded for the first time it sends TVM_ENSUREVISIBLE for