[libbus/pnp] Add check for NULL QueryDevText member
[people/sha0/winvblock.git] / src / winvblock / libbus / pnp.c
index 9b74b6d..4b04e7f 100644 (file)
@@ -323,7 +323,9 @@ WVL_M_LIB NTSTATUS STDCALL WvlBusPnp(
     switch (code) {
         case IRP_MN_QUERY_DEVICE_TEXT:
           DBG("IRP_MN_QUERY_DEVICE_TEXT\n");
-          return Bus->QueryDevText(Bus, Irp);
+          if (Bus->QueryDevText)
+            return Bus->QueryDevText(Bus, Irp);
+          return WvlIrpComplete(Irp, 0, STATUS_NOT_SUPPORTED);
 
         case IRP_MN_QUERY_BUS_INFORMATION:
           DBG("IRP_MN_QUERY_BUS_INFORMATION\n");