Changes for qnx(photon) platform only. They should not affect building/runtime other platforms.

Fixed a null pointer crash ( check for mData ).
This commit is contained in:
amardare%qnx.com 2004-06-17 21:05:12 +00:00
Родитель b7aedee852
Коммит 3382a6efbc
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -155,8 +155,10 @@ NS_IMETHODIMP nsDragService::GetNumDropItems (PRUint32 * aNumItems)
NS_IMETHODIMP nsDragService::GetData (nsITransferable * aTransferable, PRUint32 aItemIndex ) {
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsISupports> genericDataWrapper;
nsPrimitiveHelpers::CreatePrimitiveForData( mflavorStr, mData, mtmpDataLen, getter_AddRefs( genericDataWrapper ) );
rv = aTransferable->SetTransferData( mflavorStr, genericDataWrapper, mtmpDataLen );
if( mData ) {
nsPrimitiveHelpers::CreatePrimitiveForData( mflavorStr, mData, mtmpDataLen, getter_AddRefs( genericDataWrapper ) );
rv = aTransferable->SetTransferData( mflavorStr, genericDataWrapper, mtmpDataLen );
}
return rv;
}