1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-13 13:39:26 +01:00

Avoid potential NPE

This commit is contained in:
cpfeiffer 2017-11-03 22:01:11 +01:00
parent 83c06f4429
commit 23b18abfe8

View File

@ -42,6 +42,9 @@ public abstract class AbstractGBActivity extends AppCompatActivity implements GB
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
String action = intent.getAction(); String action = intent.getAction();
if (action == null) {
return;
}
switch (action) { switch (action) {
case GBApplication.ACTION_LANGUAGE_CHANGE: case GBApplication.ACTION_LANGUAGE_CHANGE:
setLanguage(GBApplication.getLanguage(), true); setLanguage(GBApplication.getLanguage(), true);