From adcfacb78508730e9ff569297dac845ddaa57eb2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 13:57:03 +0000 Subject: [PATCH] Apply same UIPI fix to MultiCommander integration Co-authored-by: emako <24737061+emako@users.noreply.github.com> --- QuickLook.Native/QuickLook.Native32/MultiCommander.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/QuickLook.Native/QuickLook.Native32/MultiCommander.cpp b/QuickLook.Native/QuickLook.Native32/MultiCommander.cpp index 16ce94a..2ef308d 100644 --- a/QuickLook.Native/QuickLook.Native32/MultiCommander.cpp +++ b/QuickLook.Native/QuickLook.Native32/MultiCommander.cpp @@ -46,6 +46,10 @@ void MultiCommander::GetSelected(PWCHAR buffer) return; } + if (pCurrentItemPath == nullptr) { + return; + } + auto path = reinterpret_cast(pCurrentItemPath); wcscpy_s(buffer, wcslen(path) + 1, path); @@ -84,6 +88,7 @@ LRESULT CALLBACK MultiCommander::msgWindowProc(HWND hWnd, UINT uMsg, WPARAM wPar case WM_COPYDATA: { delete[] pCurrentItemPath; + pCurrentItemPath = nullptr; auto cds = reinterpret_cast(lParam); auto buf = static_cast(cds->lpData);