gwenview: deep-copy added views in Gwenview::DocumentViewContainer::pretendFadeInFinished()

fixes crash in case animations are disabled

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-01-14 05:12:34 +02:00
parent 270ee6f318
commit ae9dcfe318

View file

@ -279,7 +279,8 @@ void DocumentViewContainer::pretendFadeInFinished()
{
// Animations are disabled. Pretend all fade ins are finished so that added
// views are moved to mViews
Q_FOREACH(DocumentView* view, d->mAddedViews) {
const DocumentViewSet copy = d->mAddedViews;
Q_FOREACH(DocumentView* view, copy) {
slotFadeInFinished(view);
}
}