From 69df86c1d64d62316755f1e0d1df187047c176a1 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 28 Feb 2021 22:44:41 +0000 Subject: 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. --- Userland/Libraries/LibAudio/WavLoader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Userland') 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; -- cgit v1.2.3