r=pedemonte, sr=blizzard (platform specific)
null check for clipboard data, just in case
This commit is contained in:
mkaply%us.ibm.com 2004-06-28 17:28:47 +00:00
Родитель fb7b41d3b3
Коммит 8720d4e9b2
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -242,6 +242,11 @@ void nsClipboard::SetClipboardData(const char *aFlavor)
if (NumOfBytes == 0) return;
nsPrimitiveHelpers::CreateDataFromPrimitive( aFlavor, genericDataWrapper, &pMozData, NumOfBytes );
/* If creating the data failed, just return */
if (!pMozData) {
return;
}
ULONG ulFormatID = GetFormatID( aFlavor );
if (strstr( aFlavor, "text/" )) // All text/.. flavors are null-terminated