Need Help with Potential null pointer access

Assign volumio to a new local variable before doing the null check. Use the local variable everywhere in the method instead of the field.

Rationale: The field can be assigned null by another thread at any moment so it is not safe to use.

1 Like