Qt: avoid crash in resume dialog

I don't really see how this can happen, but it should fix it.

Close #13190