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

Skip to content
Commit 4a361df5 authored by Svetoslav's avatar Svetoslav
Browse files

Fix an occasional crash in print job state fragment in Settings.

There is a NPE in the print settings if the following occurs:
We open the print job state UI in settings for an ongoing print
job (now we have action bar buttons for cancel and restart);
now the print job gets completed and we update the UI and
since the print job is not longer present we nullify the current
job reference and finish the activity. But since activity
is not finished immediately there is an opportunity for the
user to click on the action bar options which results in NPE.
The fix is to not update the print job instance in the update
UI method if the job is not available, i.e. the update method
does not mutate state if the job is no longer present, as we
are finishing and performing an operation on a finished job will
have no effect.

bug:17387134

Change-Id: I501ed1e05b8b70584b3299a16e93ead5ab7f155f
parent 0535ed55
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