From f9bed651300642f910835833ea47d797edf1bdd1 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Fri, 18 Mar 2022 00:28:16 -0700 Subject: [PATCH] SoundPlayer: Fix read of uninitialized member variables on startup I found these by running SoundPlayer under UserspaceEmulator. After boot we attempt to read from these values before they are initialized. --- Userland/Applications/SoundPlayer/Player.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Applications/SoundPlayer/Player.h b/Userland/Applications/SoundPlayer/Player.h index 7466be85f1..86c199cf9d 100644 --- a/Userland/Applications/SoundPlayer/Player.h +++ b/Userland/Applications/SoundPlayer/Player.h @@ -86,9 +86,9 @@ protected: private: Playlist m_playlist; - PlayState m_play_state; - LoopMode m_loop_mode; - ShuffleMode m_shuffle_mode; + PlayState m_play_state { PlayState::NoFileLoaded }; + LoopMode m_loop_mode { LoopMode::None }; + ShuffleMode m_shuffle_mode { ShuffleMode::None }; Audio::ConnectionFromClient& m_audio_client_connection; PlaybackManager m_playback_manager;