Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
509 stars 128 forks source link

Ensure ALStream source is not null in ALStream::queryOffset() #222

Closed lacc97 closed 2 years ago

lacc97 commented 4 years ago

Just check that ALStream::source is not null before calling source->sampleRate().

Ancurio commented 4 years ago

Hi, what is the context of this? When would the state be something other than Closed but source invalid/null?

lacc97 commented 4 years ago

I'm not entirely sure. A game I was playing would randomly crash sometimes and this seems to fix that.

Ancurio commented 4 years ago

Do you have a backtrace?

lacc97 commented 4 years ago

Hmm this is a bit unusual, I have tried to reproduce it again right now but so far it seems to not crash anymore.

I wrote this a couple of months ago so I'm not sure what could have changed.