diff --git a/client/Windows/wf_cliprdr.c b/client/Windows/wf_cliprdr.c index 8d1cfd94b..7b2abf758 100644 --- a/client/Windows/wf_cliprdr.c +++ b/client/Windows/wf_cliprdr.c @@ -1289,9 +1289,11 @@ static UINT cliprdr_send_format_list(wfClipboard* clipboard) for (index = 0; index < numFormats; index++) { - GetClipboardFormatNameA(formats[index].formatId, formatName, - sizeof(formatName)); - formats[index].formatName = _strdup(formatName); + if(GetClipboardFormatNameA(formats[index].formatId, formatName, + sizeof(formatName))) + { + formats[index].formatName = _strdup(formatName); + } } formatList.numFormats = numFormats;