mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
LibVideo: Initialize primitive member variables in PlaybackManager
Using uninitialized primitives is undefined behavior. In this case, all videos would autoplay on Serenity, but not play at all on Lagom, due to some m_playing booleans being uninitialized.
This commit is contained in:
parent
560133a0c6
commit
0f2b863c01
2 changed files with 3 additions and 3 deletions
|
@ -314,7 +314,7 @@ protected:
|
|||
return {};
|
||||
}
|
||||
|
||||
bool m_playing;
|
||||
bool m_playing { false };
|
||||
};
|
||||
|
||||
class PlaybackManager::StartingStateHandler : public PlaybackManager::ResumingStateHandler {
|
||||
|
@ -362,7 +362,7 @@ class PlaybackManager::StartingStateHandler : public PlaybackManager::ResumingSt
|
|||
return {};
|
||||
}
|
||||
|
||||
bool m_playing;
|
||||
bool m_playing { false };
|
||||
};
|
||||
|
||||
class PlaybackManager::PlayingStateHandler : public PlaybackManager::PlaybackStateHandler {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue