From a635d33edace32e152c96b25e364e3481850cb9f Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sat, 23 Jan 2016 13:37:32 +0000 Subject: [PATCH] Added try and catch for getting DateTimeStampTokens. --- source/objects/calendarevent/CalendarEvent.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/objects/calendarevent/CalendarEvent.cpp b/source/objects/calendarevent/CalendarEvent.cpp index d175eed..b266d19 100644 --- a/source/objects/calendarevent/CalendarEvent.cpp +++ b/source/objects/calendarevent/CalendarEvent.cpp @@ -150,6 +150,14 @@ void CalendarEventObject::ProcessData(){ if (DataReceived.begin() != DataReceived.end()){ + try { + DateTimeStampTokens = DataReceived.begin()->first.substr(8); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + DateTimeStampData = DataReceived.begin()->second; } -- 2.39.5