In MapLibreMapFragment.java, the negative button handler in createNoLocationDialog() iterates mapFragment.mControllers without a null check (line 1098):
for (MapModeController controller : mapFragment.mControllers) {
If the dialog is shown before setMapMode() initializes mControllers, this would NPE. In practice this is low risk since setMapMode() runs in initMap() before user-triggered dialogs, but a defensive null guard should be added for safety.
The same pattern exists in the Google flavor's BaseMapFragment — both should be fixed.
Fix:
if (mapFragment.mControllers != null) {
for (MapModeController controller : mapFragment.mControllers) {
controller.onLocation();
}
}
Found during review of #1513.