Commit d6c69017 authored by VaL Doroshchuk's avatar VaL Doroshchuk
Browse files

Fix crash in player example when close the window while playing


When it is playing and close the window:
1. The player object will be destroyed first (all QString's).
2. Next parent QWidget will be destroyed with all children.
3. While destroying QMediaPlayer from Player object, the playback will be stopped.
4. The status will be changed and Player::statusChanged will be called.
   The connection still exists.
   And since all string members are already freed, it produces a crash.

Change-Id: I2c2fdca97f0ff4b300527b550ecc0c12b04e5b4e
Reviewed-by: default avatarOliver Wolff <oliver.wolff@qt.io>
parent 86172a75
Showing with 3 additions and 0 deletions
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