Skip to content

Commit 40b4551

Browse files
committed
[IERNONCE] Check m_RegKey before deleting a value from it
This fixes an assert, when _DEBUG is defined.
1 parent a6a0705 commit 40b4551

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dll/win32/iernonce/registry.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,11 @@ BOOL RunOnceExInstance::Exec(_In_opt_ HWND hwnd)
311311
m_SectionList[i].CloseAndDelete(m_RegKey);
312312
}
313313

314-
m_RegKey.DeleteValue(L"Title");
315-
m_RegKey.DeleteValue(L"Flags");
314+
if (m_RegKey)
315+
{
316+
m_RegKey.DeleteValue(L"Title");
317+
m_RegKey.DeleteValue(L"Flags");
318+
}
316319

317320
// Notify the dialog all sections are handled.
318321
if (hwnd)

0 commit comments

Comments
 (0)