From a44efc426fbadd7d996ee55b764600c373dd9e2a Mon Sep 17 00:00:00 2001 From: Zacharyprime Date: Fri, 21 Oct 2022 13:42:10 -0500 Subject: [PATCH] Fixing servo/motor/transfer segfault --- module/camera/dependencies/zlib/CMakeLists.txt | 6 +++--- module/core/src/device/wombat/wombat_device.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/camera/dependencies/zlib/CMakeLists.txt b/module/camera/dependencies/zlib/CMakeLists.txt index dff34b05..47462385 100644 --- a/module/camera/dependencies/zlib/CMakeLists.txt +++ b/module/camera/dependencies/zlib/CMakeLists.txt @@ -11,7 +11,7 @@ set(ZLIB_COMMON_OPTIONS if (CMAKE_CROSSCOMPILING) get_property(ARCH GLOBAL PROPERTY arch) ExternalProject_Add(dep_zlib - URL https://www.zlib.net/zlib-1.2.12.tar.gz + URL https://www.zlib.net/zlib-1.2.13.tar.gz CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} ${ZLIB_COMMON_OPTIONS} @@ -19,7 +19,7 @@ if (CMAKE_CROSSCOMPILING) ) else() ExternalProject_Add(dep_zlib - URL https://www.zlib.net/zlib-1.2.12.tar.gz + URL https://www.zlib.net/zlib-1.2.13.tar.gz CMAKE_ARGS ${ZLIB_COMMON_OPTIONS} INSTALL_COMMAND make install @@ -36,4 +36,4 @@ target_include_directories(zlib_wrapper INTERFACE ${ZLIB_INCLUDE_DIR}) # z add_library(z_wrapper INTERFACE) add_dependencies(z_wrapper zlib_wrapper) -target_link_libraries(z_wrapper INTERFACE zlib_wrapper z) \ No newline at end of file +target_link_libraries(z_wrapper INTERFACE zlib_wrapper z) diff --git a/module/core/src/device/wombat/wombat_device.cpp b/module/core/src/device/wombat/wombat_device.cpp index 76ef9546..291eb784 100644 --- a/module/core/src/device/wombat/wombat_device.cpp +++ b/module/core/src/device/wombat/wombat_device.cpp @@ -162,7 +162,7 @@ class WombatDevice : public kipr::core::Device return false; } - if (read_buffer[0] != 'J') + if (read_buffer && read_buffer[0] != 'J') { logger.error() << "DMA de-synchronized"; return false;