Fix possible npe
This commit is contained in:
parent
58a07ad777
commit
f7269eed15
1 changed files with 3 additions and 2 deletions
|
@ -1444,8 +1444,9 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
||||||
if (!compassUpdateAllowed) {
|
if (!compassUpdateAllowed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final OsmandApplication app = getMyApplication();
|
Activity activity = getActivity();
|
||||||
if (app != null && adapter != null) {
|
if (activity != null && adapter != null) {
|
||||||
|
OsmandApplication app = (OsmandApplication) activity.getApplication();
|
||||||
app.runInUIThread(new Runnable() {
|
app.runInUIThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
Loading…
Reference in a new issue