diff --git a/wallpaper.cpp b/wallpaper.cpp index 630b890f4..5d91004ef 100644 --- a/wallpaper.cpp +++ b/wallpaper.cpp @@ -171,13 +171,14 @@ void Wallpaper::setBoundingRect(const QRectF& boundingRect) void Wallpaper::restore(const KConfigGroup &config, const QString &mode) { - KServiceAction modeAction; + d->mode = KServiceAction(); if (!mode.isEmpty()) { QList modes = listRenderingModes(); foreach (const KServiceAction &action, modes) { if (action.name() == mode) { - modeAction = action; + d->mode = action; + break; } } }