Skip to content

Commit

Permalink
Fix crash when with compass margins on Android (#456)
Browse files Browse the repository at this point in the history
Looks like a copy-paste error, the variable that needs to be checked is `mCompassViewMargins` and not `mCompassEnabled`.
  • Loading branch information
janicduplessis authored and kristfal committed Oct 7, 2019
1 parent 9c79766 commit 6610e4f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ private void updateUISettings() {
uiSettings.setCompassEnabled(mCompassEnabled);
}

if (mCompassEnabled != null && uiSettings.isCompassEnabled()) {
if (mCompassViewMargins != null && uiSettings.isCompassEnabled()) {
int pixelDensity = (int)getResources().getDisplayMetrics().density;

int xMargin = mCompassViewMargins.getInt("x") * pixelDensity;
Expand Down

0 comments on commit 6610e4f

Please sign in to comment.