From 0fac6e8e73e4a7fca6be10c84c788c208fc047b4 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sat, 3 Feb 2024 16:52:22 +0000 Subject: [PATCH] Enable access to the device info outside the if statements --- plugins/usbdmx/EuroliteProFactory.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/usbdmx/EuroliteProFactory.cpp b/plugins/usbdmx/EuroliteProFactory.cpp index be380862a..42efe7bea 100644 --- a/plugins/usbdmx/EuroliteProFactory.cpp +++ b/plugins/usbdmx/EuroliteProFactory.cpp @@ -92,11 +92,11 @@ bool EuroliteProFactory::DeviceAdded( libusb_device *usb_device, const struct libusb_device_descriptor &descriptor) { bool is_mk2 = false; + LibUsbAdaptor::DeviceInformation info; // Eurolite USB-DMX512-PRO? if (descriptor.idVendor == VENDOR_ID && descriptor.idProduct == PRODUCT_ID) { OLA_INFO << "Found a new Eurolite USB-DMX512-PRO device"; - LibUsbAdaptor::DeviceInformation info; if (!m_adaptor->GetDeviceInfo(usb_device, descriptor, &info)) { return false; } @@ -112,7 +112,6 @@ bool EuroliteProFactory::DeviceAdded( // Eurolite USB-DMX512-PRO MK2? } else if (descriptor.idVendor == VENDOR_ID_MK2 && descriptor.idProduct == PRODUCT_ID_MK2) { - LibUsbAdaptor::DeviceInformation info; if (!m_adaptor->GetDeviceInfo(usb_device, descriptor, &info)) { return false; }