- Events_MessageGroup* aGroup = dynamic_cast<Events_MessageGroup*>(&theMessage);
- if (aGroup) {
- std::map<char*, Events_MessageGroup*>::iterator aMyGroup =
- myGroups.find(aGroup->eventID().eventText());
- if (aMyGroup == myGroups.end()) { // create a new group of messages for accumulation
- myGroups[aGroup->eventID().eventText()] = aGroup->newEmpty();
- aMyGroup = myGroups.find(aGroup->eventID().eventText());
+ if (isGroup) {
+ Events_MessageGroup* aGroup = dynamic_cast<Events_MessageGroup*>(&theMessage);
+ if (aGroup) {
+ std::map<char*, Events_MessageGroup*>::iterator aMyGroup =
+ myGroups.find(aGroup->eventID().eventText());
+ if (aMyGroup == myGroups.end()) { // create a new group of messages for accumulation
+ myGroups[aGroup->eventID().eventText()] = aGroup->newEmpty();
+ aMyGroup = myGroups.find(aGroup->eventID().eventText());
+ }
+ aMyGroup->second->Join(*aGroup);
+ return;