mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Fix for bug 362162: copy image to other app and crash on exit
r+sr=pavlov
This commit is contained in:
parent
316c1997d8
commit
ae0091f3b4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user