Skip to content
Commit cebdbaf5 authored by Christoph Feck's avatar Christoph Feck
Browse files

KViewStateSerializer: Fix crash when view is destroyed before state serializer

KViewStateSerializer::restoreScrollBarState() calls QScrollBar::maximum()
on an invalid (i.e. already deleted) scrollbar. This means, the enclosing
QAbstractScrollArea has been deleted between the call to ::restoreScrollState()
and the deferred (via a single shot timer) ::restoreScrollBarState().

This commit works around the issue by allowing users to delete the view
immediately after ::restoreScrollState() was called.

BUG: 353380
FIXED-IN: 5.35.0

Reviewers: #frameworks, skelly

Reviewed By: skelly

Subscribers: mlaurent

Differential Revision: https://phabricator.kde.org/D5821
parent ff2e1d8e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment