aboutsummaryrefslogtreecommitdiffstats
path: root/examples/alstreamcb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/alstreamcb.cpp')
-rw-r--r--examples/alstreamcb.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/alstreamcb.cpp b/examples/alstreamcb.cpp
index f8eaf510..994a9c97 100644
--- a/examples/alstreamcb.cpp
+++ b/examples/alstreamcb.cpp
@@ -83,10 +83,10 @@ struct StreamPlayer {
StreamPlayer()
{
alGenBuffers(1, &mBuffer);
- if(ALenum err{alGetError()})
+ if(alGetError() != AL_NO_ERROR)
throw std::runtime_error{"alGenBuffers failed"};
alGenSources(1, &mSource);
- if(ALenum err{alGetError()})
+ if(alGetError() != AL_NO_ERROR)
{
alDeleteBuffers(1, &mBuffer);
throw std::runtime_error{"alGenSources failed"};