Fix possible crash on startup status updates in Redis

refs #4991
This commit is contained in:
Michael Friedrich 2017-03-24 14:11:20 +01:00
parent 3310cc30ae
commit 91b8decaac

View File

@ -178,6 +178,10 @@ void RedisWriter::SendStatusUpdate(const ConfigObject::Ptr& object, const String
{ {
AssertOnWorkQueue(); AssertOnWorkQueue();
/* during startup we might receive check results, ignore them without any connection */
if (!m_Context)
return;
/* Serialize config object attributes */ /* Serialize config object attributes */
Dictionary::Ptr objectAttrs = SerializeObjectAttrs(object, FAState); Dictionary::Ptr objectAttrs = SerializeObjectAttrs(object, FAState);