зеркало из https://github.com/mozilla/gecko-dev.git
r=pedemonte, sr=blizzard (platform specific) null check for clipboard data, just in case
This commit is contained in:
Родитель
fb7b41d3b3
Коммит
8720d4e9b2
|
@ -242,6 +242,11 @@ void nsClipboard::SetClipboardData(const char *aFlavor)
|
||||||
if (NumOfBytes == 0) return;
|
if (NumOfBytes == 0) return;
|
||||||
nsPrimitiveHelpers::CreateDataFromPrimitive( aFlavor, genericDataWrapper, &pMozData, NumOfBytes );
|
nsPrimitiveHelpers::CreateDataFromPrimitive( aFlavor, genericDataWrapper, &pMozData, NumOfBytes );
|
||||||
|
|
||||||
|
/* If creating the data failed, just return */
|
||||||
|
if (!pMozData) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ULONG ulFormatID = GetFormatID( aFlavor );
|
ULONG ulFormatID = GetFormatID( aFlavor );
|
||||||
|
|
||||||
if (strstr( aFlavor, "text/" )) // All text/.. flavors are null-terminated
|
if (strstr( aFlavor, "text/" )) // All text/.. flavors are null-terminated
|
||||||
|
|
Загрузка…
Ссылка в новой задаче