diff options
author | Chris Robinson <[email protected]> | 2023-04-28 22:49:45 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-04-28 22:49:45 -0700 |
commit | 234174c62123c5d2f57d649722b5ca53b0de9d2d (patch) | |
tree | 0ff0cb9c5fca501bb5e8d21684eaa181060bab5f | |
parent | 102789d4487a8dbbb13a131dde3d21a612e86adb (diff) |
Don't try to access null pointers
-rw-r--r-- | al/auxeffectslot.cpp | 3 | ||||
-rw-r--r-- | al/buffer.cpp | 3 | ||||
-rw-r--r-- | al/effect.cpp | 3 | ||||
-rw-r--r-- | al/filter.cpp | 3 | ||||
-rw-r--r-- | al/source.cpp | 3 |
5 files changed, 15 insertions, 0 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index 285da1d4..571eb717 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -1023,6 +1023,9 @@ void UpdateAllEffectSlotProps(ALCcontext *context) EffectSlotSubList::~EffectSlotSubList() { + if(!EffectSlots) + return; + uint64_t usemask{~FreeMask}; while(usemask) { diff --git a/al/buffer.cpp b/al/buffer.cpp index 93484e7d..b89ad5af 100644 --- a/al/buffer.cpp +++ b/al/buffer.cpp @@ -1526,6 +1526,9 @@ END_API_FUNC BufferSubList::~BufferSubList() { + if(!Buffers) + return; + uint64_t usemask{~FreeMask}; while(usemask) { diff --git a/al/effect.cpp b/al/effect.cpp index bde89912..28f5e967 100644 --- a/al/effect.cpp +++ b/al/effect.cpp @@ -548,6 +548,9 @@ void InitEffect(ALeffect *effect) EffectSubList::~EffectSubList() { + if(!Effects) + return; + uint64_t usemask{~FreeMask}; while(usemask) { diff --git a/al/filter.cpp b/al/filter.cpp index 73efa01f..c5d1b2a1 100644 --- a/al/filter.cpp +++ b/al/filter.cpp @@ -709,6 +709,9 @@ END_API_FUNC FilterSubList::~FilterSubList() { + if(!Filters) + return; + uint64_t usemask{~FreeMask}; while(usemask) { diff --git a/al/source.cpp b/al/source.cpp index afb63c6d..f51c3bca 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -4033,6 +4033,9 @@ void UpdateAllSourceProps(ALCcontext *context) SourceSubList::~SourceSubList() { + if(!Sources) + return; + uint64_t usemask{~FreeMask}; while(usemask) { |