summaryrefslogtreecommitdiffstats
path: root/weather
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-09-12 10:56:00 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-09-12 19:06:08 +0000
commitfc112fb9066e26e5481b3a434ac9be614f97367a (patch)
tree0e3a2e26d244a7decba586e68bb154e68298f1d6 /weather
parentcc65b62a4625188c8aab3406dd50d71c16722a3a (diff)
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 <matt.ranostay@konsulko.com> (cherry picked from commit 051bf8e79c99699704032b7b943459a30aae22c8)
Diffstat (limited to 'weather')
-rw-r--r--weather/weather.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/weather/weather.cpp b/weather/weather.cpp
index a4edb2a..c77e742 100644
--- a/weather/weather.cpp
+++ b/weather/weather.cpp
@@ -39,7 +39,7 @@ void Weather::onConnected()
WeatherMessage *tmsg = new WeatherMessage();
tmsg->createRequest("subscribe", "weather");
m_mloop->sendMessage(tmsg);
- tmsg->deleteLater();
+ delete tmsg;
}
void Weather::onDisconnected()
@@ -47,7 +47,7 @@ void Weather::onDisconnected()
WeatherMessage *tmsg = new WeatherMessage();
tmsg->createRequest("unsubscribe", "weather");
m_mloop->sendMessage(tmsg);
- tmsg->deleteLater();
+ delete tmsg;
}
void Weather::onMessageReceived(MessageType type, Message *message)