From 0f4879fe64c92a9fcadbd0722ff766e3fbdba8ee Mon Sep 17 00:00:00 2001 From: Walleza1 <24304667+Walleza1@users.noreply.github.com> Date: Wed, 29 May 2019 19:50:47 +0200 Subject: [PATCH] Removing delete condition (img) from commonitor --- software/raspberry/superviseur-robot/lib/commonitor.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/software/raspberry/superviseur-robot/lib/commonitor.cpp b/software/raspberry/superviseur-robot/lib/commonitor.cpp index bb64388..7caa443 100644 --- a/software/raspberry/superviseur-robot/lib/commonitor.cpp +++ b/software/raspberry/superviseur-robot/lib/commonitor.cpp @@ -150,9 +150,8 @@ void ComMonitor::Write(Message *msg) { //cout << "Message sent to monitor: " << str->c_str() << endl; write(clientID, str.c_str(), str.length()); - if (!msg->CompareID(MESSAGE_CAM_IMAGE)) { - delete(msg); - } + // Delete msg + delete(msg); // Call user method after write Write_Post();