COM: Allow SysAllocString(NULL)

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2025-01-16 13:14:30 +01:00
parent e432882d3b
commit e1d4e03831

View File

@ -207,7 +207,7 @@ namespace winstd
bstr(_In_opt_z_ LPCOLESTR src)
{
m_h = SysAllocString(src);
if (!m_h)
if (src && !m_h)
throw std::bad_alloc();
}