[kcms/automounter] Fix crash on close

The KCM widget and its children are destroyed before the KCModule.

Therefore by the time we call saveLayout the widget is already deleted and accessing it crashes.

Instead save the layout right before the widget is deleted

BUG: 484690

SENTRY: SYSTEMSETTINGS-2D3

Merge request reports

Loading