minor fix in SetupDiGetDeviceInstanceIdA

svn path=/trunk/; revision=19623
This commit is contained in:
Thomas Bluemel 2005-11-26 10:18:24 +00:00
parent 89a84ca384
commit e0e1a6603f

View file

@ -3493,7 +3493,7 @@ BOOL WINAPI SetupDiGetDeviceInstanceIdA(
DeviceInstanceIdW, DeviceInstanceIdSize,
RequiredSize);
if (DeviceInstanceIdW != NULL)
if (ret && DeviceInstanceIdW != NULL)
{
if (WideCharToMultiByte(CP_ACP, 0, DeviceInstanceIdW, -1,
DeviceInstanceId, DeviceInstanceIdSize, NULL, NULL) == 0)