Don't crash if the twain device name is null.

oldstable
Mike McCormack 2005-09-06 09:23:24 +00:00 committed by Alexandre Julliard
parent 54a2891d33
commit abe2c5811b
1 changed files with 4 additions and 1 deletions

View File

@ -185,7 +185,10 @@ TW_UINT16 TWAIN_IdentityGetNext (pTW_IDENTITY pOrigin, TW_MEMREF pData)
TRACE("DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT\n");
if (device_list && device_list[DSM_currentDevice])
if (device_list && device_list[DSM_currentDevice] &&
device_list[DSM_currentDevice]->name &&
device_list[DSM_currentDevice]->vendor &&
device_list[DSM_currentDevice]->model)
{
pSourceIdentity->Id = DSM_sourceId ++;
strcpy (pSourceIdentity->ProductName, device_list[DSM_currentDevice]->name);