From 5f29f674d813fce3cfe042b052dfa1f6c30aa175 Mon Sep 17 00:00:00 2001 From: Luca Bartoli Date: Mon, 2 Oct 2023 10:09:22 +0200 Subject: [PATCH] fix unitialized sdk_framework_cfg_ptr_ Signed-off-by: Luca Bartoli --- sdk_core/comm/define.h | 2 +- sdk_core/device_manager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_core/comm/define.h b/sdk_core/comm/define.h index cd4b4ea..d2e846d 100644 --- a/sdk_core/comm/define.h +++ b/sdk_core/comm/define.h @@ -83,7 +83,7 @@ typedef struct { } LivoxLidarLoggerCfg; typedef struct { - bool master_sdk; + bool master_sdk = true; } LivoxLidarSdkFrameworkCfg; typedef enum { diff --git a/sdk_core/device_manager.cpp b/sdk_core/device_manager.cpp index e28101e..3903197 100644 --- a/sdk_core/device_manager.cpp +++ b/sdk_core/device_manager.cpp @@ -44,7 +44,7 @@ namespace livox { namespace lidar { DeviceManager::DeviceManager() - : sdk_framework_cfg_ptr_(nullptr), + : sdk_framework_cfg_ptr_(new LivoxLidarSdkFrameworkCfg()), lidars_cfg_ptr_(nullptr), custom_lidars_cfg_ptr_(nullptr), lidar_logger_cfg_ptr_(nullptr),