Commit abe2c581 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

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

parent 54a2891d
...@@ -185,7 +185,10 @@ TW_UINT16 TWAIN_IdentityGetNext (pTW_IDENTITY pOrigin, TW_MEMREF pData) ...@@ -185,7 +185,10 @@ TW_UINT16 TWAIN_IdentityGetNext (pTW_IDENTITY pOrigin, TW_MEMREF pData)
TRACE("DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT\n"); 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 ++; pSourceIdentity->Id = DSM_sourceId ++;
strcpy (pSourceIdentity->ProductName, device_list[DSM_currentDevice]->name); strcpy (pSourceIdentity->ProductName, device_list[DSM_currentDevice]->name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment