Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117752455
D2548.1775189392.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D2548.1775189392.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 4:09 AM (19 h, 23 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18822535
Default Alt Text
D2548.1775189392.diff (1 KB)
Attached To
Mode
D2548: Fix memory bugs
Attached
Detach File
Event Timeline