minor fix in SetupDiGetDeviceInstanceIdA
authorThomas Bluemel <thomas@reactsoft.com>
Sat, 26 Nov 2005 10:18:24 +0000 (10:18 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Sat, 26 Nov 2005 10:18:24 +0000 (10:18 +0000)
svn path=/trunk/; revision=19623

reactos/lib/setupapi/devinst.c

index 86e2dad..85ef915 100644 (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)