mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-03 21:21:12 +08:00
Add check to prevent possible IllegalStateException
This commit is contained in:
parent
2e0eb68f63
commit
0d25474ea4
@ -318,6 +318,9 @@ public class StatusFragment extends Fragment implements AppStateListener, AppsLo
|
||||
if((app != null) && (app.getIcon() != null)) {
|
||||
// Rendering after mCollectorInfo.setText is deferred, so getMeasuredHeight must be postponed
|
||||
mHandler.post(() -> {
|
||||
if(getContext() == null)
|
||||
return;
|
||||
|
||||
int height = mCollectorInfo.getMeasuredHeight();
|
||||
Drawable drawable = Utils.scaleDrawable(getResources(), app.getIcon(), height, height);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user