t3knomanzer / maxmix-software

Maxmix volume mixer software repository
https://maxmixproject.com
Apache License 2.0
126 stars 31 forks source link

Added null check for dispose #172

Closed SchemingWeasels closed 4 years ago

SchemingWeasels commented 4 years ago

Issues

Description

Check if _events is null before attempting to UnregisterAudioSessionNotification

Types of changes

Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

SchemingWeasels commented 4 years ago

Should the null check be for everything, Including de registering the events, or only for UnregisterAudioSessionNotification? If events is null, then -= it doesn't do anything anyways right?