зеркало из https://github.com/mozilla/pjs.git
Fix for bug 362162: copy image to other app and crash on exit
r+sr=pavlov
This commit is contained in:
Родитель
7087895ddc
Коммит
056a8a92c8
|
@ -1076,7 +1076,7 @@ HRESULT nsDataObj::GetPreferredDropEffect ( FORMATETC& aFE, STGMEDIUM& aSTG )
|
|||
//-----------------------------------------------------
|
||||
HRESULT nsDataObj::GetText(const nsACString & aDataFlavor, FORMATETC& aFE, STGMEDIUM& aSTG)
|
||||
{
|
||||
void* data;
|
||||
void* data = NULL;
|
||||
PRUint32 len;
|
||||
|
||||
// if someone asks for text/plain, look up text/unicode instead in the transferable.
|
||||
|
@ -1093,6 +1093,9 @@ HRESULT nsDataObj::GetText(const nsACString & aDataFlavor, FORMATETC& aFE, STGME
|
|||
if ( !len )
|
||||
return ResultFromScode(E_FAIL);
|
||||
nsPrimitiveHelpers::CreateDataFromPrimitive ( flavorStr, genericDataWrapper, &data, len );
|
||||
if ( !data )
|
||||
return ResultFromScode(E_FAIL);
|
||||
|
||||
HGLOBAL hGlobalMemory = NULL;
|
||||
|
||||
aSTG.tymed = TYMED_HGLOBAL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче