From 051bf8e79c99699704032b7b943459a30aae22c8 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Wed, 12 Sep 2018 10:56:00 -0700 Subject: libqtappfw: remove deleteLater instances that aren't used Remove several deleteLater calls that should have been delete's. This should solve race conditions that an object calls deleteLater(), and leaves scope before the QT main loop is called. Outcome of the race condition is that sometimes the memory allocator reallocates it to another message and causes a crash. Bug-AGL: SPEC-1680 Change-Id: Ic83d8c6c204c6e3248bbe9a9def1842e1e384b2b Signed-off-by: Matt Ranostay --- mediaplayer/mediaplayer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mediaplayer') diff --git a/mediaplayer/mediaplayer.cpp b/mediaplayer/mediaplayer.cpp index 384badf..bf0b4bc 100644 --- a/mediaplayer/mediaplayer.cpp +++ b/mediaplayer/mediaplayer.cpp @@ -76,7 +76,7 @@ void Mediaplayer::control(QString control, QJsonObject parameter) tmsg->createRequest("controls", parameter); m_mloop->sendMessage(tmsg); - tmsg->deleteLater(); + delete tmsg; } @@ -166,7 +166,7 @@ void Mediaplayer::onConnected() parameter.insert("value", eventIterator.next()); tmsg->createRequest("subscribe", parameter); m_mloop->sendMessage(tmsg); - tmsg->deleteLater(); + delete tmsg; } } @@ -181,7 +181,7 @@ void Mediaplayer::onDisconnected() parameter.insert("value", eventIterator.next()); tmsg->createRequest("unsubscribe", parameter); m_mloop->sendMessage(tmsg); - tmsg->deleteLater(); + delete tmsg; } } -- cgit 1.2.3-korg