greysonp / permiso

An Android library to make handling runtime permissions a whole lot easier.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix possible NPE in Permiso.onRequestPermissionResult()

greysonp opened this issue · comments

If Permiso.onRequestPermissionResult() is given a request code that Permiso didn't generate, it could throw a null pointer exception. Users shouldn't be giving it these request codes, but still. We should just add a null check and log a warning if that happens, not crash.