From ca24b7878cf7cf097a78780c0ec8d2e037089e6e Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Sun, 9 Apr 2023 20:09:03 -0400 Subject: [PATCH] only write the message data if there is any --- platform/qt/dmxwidget/dmxwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/qt/dmxwidget/dmxwidget.cpp b/platform/qt/dmxwidget/dmxwidget.cpp index 7acdf3c..751bef7 100644 --- a/platform/qt/dmxwidget/dmxwidget.cpp +++ b/platform/qt/dmxwidget/dmxwidget.cpp @@ -126,7 +126,8 @@ void DmxWidget::sendMessage(std::shared_ptr msg) const *stream << ENTTEC::Pro::START_DELIMITER; *stream << msg->label; *stream << length; - *stream << msg; + if (length) + *stream << msg; *stream << ENTTEC::Pro::END_DELIMITER; port_->write(reinterpret_cast(buffer), sizeof(buffer));