From 97b174f6df3c4ebbf066f91f80552d2f2b9d88b5 Mon Sep 17 00:00:00 2001 From: Fabio Streun Date: Thu, 14 May 2020 12:43:25 +0200 Subject: [PATCH] Fix DeviceConfig default initialization Initialize smartshift to nullptr. Otherwise, the device configuration contains a SmartshiftStatus, even though, none was declared in the configuration file. This causes later an error if the device does not support SmartShift. --- src/logid/Configuration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logid/Configuration.h b/src/logid/Configuration.h index 463b51f..07d5765 100644 --- a/src/logid/Configuration.h +++ b/src/logid/Configuration.h @@ -20,7 +20,7 @@ namespace logid DeviceConfig(DeviceConfig* dc, Device* dev); DeviceConfig(const libconfig::Setting& root); const int* dpi = nullptr; - HIDPP20::ISmartShift::SmartshiftStatus* smartshift; + HIDPP20::ISmartShift::SmartshiftStatus* smartshift = nullptr; const uint8_t* hiresscroll = nullptr; std::map actions; const bool baseConfig = true;