Do not crash if the clipboard format is unknown.

This commit is contained in:
Rein Klazes 2004-04-05 20:17:13 +00:00 committed by Alexandre Julliard
parent ca97f7fd26
commit 46138d8ef7
1 changed files with 2 additions and 2 deletions

View File

@ -369,7 +369,7 @@ LPWINE_CLIPFORMAT X11DRV_CLIPBOARD_LookupFormat(WORD wID)
lpFormat = lpFormat->NextFormat;
}
if (!lpFormat->drvData) intern_atoms();
if (lpFormat && !lpFormat->drvData) intern_atoms();
return lpFormat;
}
@ -1656,7 +1656,7 @@ static BOOL X11DRV_CLIPBOARD_ReadClipboardData(UINT wFormat)
lpFormat = X11DRV_CLIPBOARD_LookupFormat(wFormat);
if (lpFormat->drvData)
if (lpFormat && lpFormat->drvData)
{
DWORD i;
UINT alias;