Gracefully handle edge case where clipboard format name is NULL

This commit is contained in:
Marc-André Moreau 2021-05-26 14:29:52 -04:00 committed by akallabeth
parent af08701c10
commit 1f1ce81b22

View File

@ -89,6 +89,9 @@ static wClipboardFormat* ClipboardFindFormat(wClipboard* clipboard, UINT32 forma
{
for (index = 0; index < clipboard->numFormats; index++)
{
if (!clipboard->formats[index].formatName)
continue;
if (strcmp(name, clipboard->formats[index].formatName) == 0)
{
format = &clipboard->formats[index];