[IERNONCE] Check m_RegKey before deleting a value from it

This fixes an assert, when _DEBUG is defined.
This commit is contained in:
Timo Kreuzer 2024-12-03 12:40:01 +02:00
parent a6a07059c1
commit 40b45515a4

View file

@ -311,8 +311,11 @@ BOOL RunOnceExInstance::Exec(_In_opt_ HWND hwnd)
m_SectionList[i].CloseAndDelete(m_RegKey);
}
m_RegKey.DeleteValue(L"Title");
m_RegKey.DeleteValue(L"Flags");
if (m_RegKey)
{
m_RegKey.DeleteValue(L"Title");
m_RegKey.DeleteValue(L"Flags");
}
// Notify the dialog all sections are handled.
if (hwnd)