Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1a60b363 authored by Markus Dobel's avatar Markus Dobel Committed by Danny Baumann
Browse files

Fix NPE in flashlight button of energy widget

In somewhat unreproducible cases, pushing the flashlight button caused a
NullPointerException when trying to access the (not yet initialized)
mContext member variable in toggleState().

As I could not reproduce this reliably, and found no clear reason for the
variable to be uninitialized sometimes, but as there seems no need to
remember the context in a member variable anyway, I removed it and
refactored the methods to use a method parameter instead.

Change-Id: Id2b194f9f5785bcbbeb4bcd3d603510e0d0f71ce
parent 5945fc3f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment