MG: fixed empty clipboard stream crashing bug

git-svn-id: trunk@415 -
This commit is contained in:
lazarus 2001-11-12 19:32:23 +00:00
parent c29c15268b
commit f2e975497d

View File

@ -1333,7 +1333,8 @@ writeln('[ClipboardSelectionRequestHandler] Len=',BufLength);
{$ENDIF} {$ENDIF}
gtk_selection_data_set(SelectionData,SelectionData^.Target,BitCount, gtk_selection_data_set(SelectionData,SelectionData^.Target,BitCount,
Buffer,BufLength); Buffer,BufLength);
FreeMem(Buffer); if Buffer<>nil then
FreeMem(Buffer);
finally finally
MemStream.Free; MemStream.Free;
end; end;
@ -1388,6 +1389,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.43 2001/11/12 19:32:23 lazarus
MG: fixed empty clipboard stream crashing bug
Revision 1.42 2001/11/12 16:56:08 lazarus Revision 1.42 2001/11/12 16:56:08 lazarus
MG: CLIPBOARD MG: CLIPBOARD