diff options
author | Luke <luke.wilde@live.co.uk> | 2021-02-28 22:44:41 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-01 11:09:09 +0100 |
commit | 69df86c1d64d62316755f1e0d1df187047c176a1 (patch) | |
tree | 0a7ac17ca032555416f4cc792a3001f93f7b983f /Userland | |
parent | a66f96ff624e6d1f73dda1e382c0d0503c1508e3 (diff) | |
download | serenity-69df86c1d64d62316755f1e0d1df187047c176a1.zip |
LibAudio: Use handle_any_error in WAV loader
It was using has_any_error, which causes an assertion failure when
destroying the stream. Instead, use handle_any_error, as the
WAV loader does handle errors.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibAudio/WavLoader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibAudio/WavLoader.cpp b/Userland/Libraries/LibAudio/WavLoader.cpp index 23c013ef50..28c2fb8277 100644 --- a/Userland/Libraries/LibAudio/WavLoader.cpp +++ b/Userland/Libraries/LibAudio/WavLoader.cpp @@ -125,7 +125,7 @@ bool WavLoaderPlugin::parse_header() ok = false; } else { *m_stream >> value; - if (m_stream->has_any_error()) + if (m_stream->handle_any_error()) ok = false; } return value; @@ -139,7 +139,7 @@ bool WavLoaderPlugin::parse_header() ok = false; } else { *m_stream >> value; - if (m_stream->has_any_error()) + if (m_stream->handle_any_error()) ok = false; } return value; @@ -153,7 +153,7 @@ bool WavLoaderPlugin::parse_header() ok = false; } else { *m_stream >> value; - if (m_stream->has_any_error()) + if (m_stream->handle_any_error()) ok = false; } return value; |