mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
fix: 修复双击关闭按钮后闪退的问题
This commit is contained in:
parent
f4bd23d4bb
commit
a8508cbe21
1 changed files with 3 additions and 0 deletions
|
|
@ -373,6 +373,9 @@ protected:
|
|||
}
|
||||
case WM_DESTROY:
|
||||
{
|
||||
// 防止双击关闭按钮时崩溃。崩溃发生在 XAML Islands 内部,Win10 和 Win11 上都可以复现。
|
||||
EnableWindow(this->Handle(), FALSE);
|
||||
|
||||
_xamlSourceNative2 = nullptr;
|
||||
// 必须手动重置 Content,否则会内存泄露,使 RootPage 无法析构
|
||||
_xamlSource.Content(nullptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue