windows fix: cliprdr_send_format_list format name
authorjcrespo-asg <jaime.crespo@asg.com>
Wed, 11 Jan 2017 13:29:48 +0000 (14:29 +0100)
committerjcrespo-asg <jaime.crespo@asg.com>
Wed, 11 Jan 2017 13:29:48 +0000 (14:29 +0100)
client/Windows/wf_cliprdr.c

index 8d1cfd9..7b2abf7 100644 (file)
@@ -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;