diff --git a/src/plasma/package.cpp b/src/plasma/package.cpp index 6acdeea3c..0c881db9d 100644 --- a/src/plasma/package.cpp +++ b/src/plasma/package.cpp @@ -636,6 +636,8 @@ void Package::setRequired(const char *key, bool required) } d.detach(); + // have to find the item again after detaching: d->contents is a different object now + it = d->contents.find(key); it.value().required = required; } @@ -656,6 +658,8 @@ void Package::setMimeTypes(const char *key, QStringList mimeTypes) } d.detach(); + // have to find the item again after detaching: d->contents is a different object now + it = d->contents.find(key); it.value().mimeTypes = mimeTypes; #endif }