aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-04-12 10:55:43 -0700
committerRob Mensching <rob@firegiant.com>2021-04-12 15:21:05 -0700
commitdd04895571894674e356cce1cab259758e9a87f2 (patch)
tree5401395451753402747093ee6480f417bcad49c0 /src
parent3799e0593c4ec384ed16205386e60803ff9afb3c (diff)
downloadwix-dd04895571894674e356cce1cab259758e9a87f2.tar.gz
wix-dd04895571894674e356cce1cab259758e9a87f2.tar.bz2
wix-dd04895571894674e356cce1cab259758e9a87f2.zip
Release taskbar before COM uninitialized to prevent crash
Fixes wixtoolset/issues#5966
Diffstat (limited to 'src')
-rw-r--r--src/wixstdba/WixStandardBootstrapperApplication.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/wixstdba/WixStandardBootstrapperApplication.cpp b/src/wixstdba/WixStandardBootstrapperApplication.cpp
index 0fcf3a21..f690c1a6 100644
--- a/src/wixstdba/WixStandardBootstrapperApplication.cpp
+++ b/src/wixstdba/WixStandardBootstrapperApplication.cpp
@@ -1894,6 +1894,7 @@ private: // privates
1894 LExit: 1894 LExit:
1895 // destroy main window 1895 // destroy main window
1896 pThis->DestroyMainWindow(); 1896 pThis->DestroyMainWindow();
1897 pThis->UninitializeTaskbarButton();
1897 1898
1898 // initiate engine shutdown 1899 // initiate engine shutdown
1899 DWORD dwQuit = HRESULT_CODE(hr); 1900 DWORD dwQuit = HRESULT_CODE(hr);
@@ -2556,6 +2557,17 @@ private: // privates
2556 } 2557 }
2557 } 2558 }
2558 2559
2560
2561 //
2562 // UninitializeTaskbarButton - clean up the taskbar registration.
2563 //
2564 void UninitializeTaskbarButton()
2565 {
2566 m_fTaskbarButtonOK = FALSE;
2567 ReleaseNullObject(m_pTaskbarList);
2568 }
2569
2570
2559 static LRESULT CallDefaultWndProc( 2571 static LRESULT CallDefaultWndProc(
2560 __in CWixStandardBootstrapperApplication* pBA, 2572 __in CWixStandardBootstrapperApplication* pBA,
2561 __in HWND hWnd, 2573 __in HWND hWnd,
@@ -3857,6 +3869,7 @@ public:
3857 ~CWixStandardBootstrapperApplication() 3869 ~CWixStandardBootstrapperApplication()
3858 { 3870 {
3859 AssertSz(!::IsWindow(m_hWnd), "Window should have been destroyed before destructor."); 3871 AssertSz(!::IsWindow(m_hWnd), "Window should have been destroyed before destructor.");
3872 AssertSz(!m_pTaskbarList, "Taskbar should have been released before destructor.");
3860 AssertSz(!m_pTheme, "Theme should have been released before destructor."); 3873 AssertSz(!m_pTheme, "Theme should have been released before destructor.");
3861 3874
3862 for (DWORD i = 0; i < m_Bundle.packages.cPackages; ++i) 3875 for (DWORD i = 0; i < m_Bundle.packages.cPackages; ++i)
@@ -3865,7 +3878,6 @@ public:
3865 } 3878 }
3866 3879
3867 ::DeleteCriticalSection(&m_csShowingInternalUiThisPackage); 3880 ::DeleteCriticalSection(&m_csShowingInternalUiThisPackage);
3868 ReleaseObject(m_pTaskbarList);
3869 ReleaseDict(m_sdOverridableVariables); 3881 ReleaseDict(m_sdOverridableVariables);
3870 ReleaseStr(m_sczFailedMessage); 3882 ReleaseStr(m_sczFailedMessage);
3871 ReleaseStr(m_sczConfirmCloseMessage); 3883 ReleaseStr(m_sczConfirmCloseMessage);