Page MenuHomePhorge

D2548.1775189392.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D2548.1775189392.diff

diff --git a/calendaring/event.cpp b/calendaring/event.cpp
--- a/calendaring/event.cpp
+++ b/calendaring/event.cpp
@@ -76,17 +76,22 @@
void Event::delegate(const std::vector< Attendee >& delegators, const std::vector< Attendee >& delegatees)
{
- //First build a list of attendee references, and insert any missing attendees
- std::vector<Kolab::Attendee*> delegateesRef;
+ //First insert any missing attendees
foreach(const Attendee &a, delegatees) {
- if (Attendee *attendee = getAttendee(a.contact())) {
- delegateesRef.push_back(attendee);
- } else {
+ if (!getAttendee(a.contact())) {
d->attendees.push_back(a);
- delegateesRef.push_back(&d->attendees.back());
}
}
+ //Build a list of attendee references
+ //These are pointers into d->attendees, so we MUST NOT modify that vector after this point!
+ std::vector<Kolab::Attendee*> delegateesRef;
+ foreach(const Attendee &a, delegatees) {
+ Attendee *attendee = getAttendee(a.contact());
+ Q_ASSERT(attendee);
+ delegateesRef.push_back(attendee);
+ }
+
std::vector<Kolab::Attendee*> delegatorsRef;
foreach(const Attendee& a, delegators) {
if (Attendee *attendee = getAttendee(a.contact())) {

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 3, 4:09 AM (6 h, 16 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18822535
Default Alt Text
D2548.1775189392.diff (1 KB)

Event Timeline