From 2130047bd6288124128dd6fda7cda541d623c410 Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Sat, 8 Apr 2023 17:22:19 +0200 Subject: [PATCH] Prevent potential Explorer crash Fixes #1523 --- Src/ClassicExplorer/ExplorerBHO.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Src/ClassicExplorer/ExplorerBHO.cpp b/Src/ClassicExplorer/ExplorerBHO.cpp index 9448d8e..edabf46 100644 --- a/Src/ClassicExplorer/ExplorerBHO.cpp +++ b/Src/ClassicExplorer/ExplorerBHO.cpp @@ -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