Skip to content
Snippets Groups Projects
Guillaume Roguez's avatar
Guillaume Roguez authored
VCardUtils::parseMimeAttributes() returns by value, but
it was used in IMConversationManagerPrivate::newMessage() by reference.
So this reference is on a stack-allocated object and can be invalidated
by the system.

Use a by-value copy, mostly optimized by compiler with copy elision [1].

[1] http://en.cppreference.com/w/cpp/language/copy_elision



Change-Id: I1b7ef8eb1ebc738949243d5ace1363d4b4fa3caf
Reviewed-by: default avatarNicolas Jäger <nicolas.jager@savoirfairelinux.com>
c7695063
History