ModemManager crash while trying to change primary sim slot
Hi.
mmcli -m 0 --set-primary-sim-slot=2 can cause a crash if modem does not support sim slots loading.
Problem is here: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/blob/master/src/mm-iface-modem.c#L1129
Please just add simple check sim_slot_paths for NULL to avoid this:
if (!sim_slot_paths || ctx->requested_sim_slot > g_strv_length ((gchar **)sim_slot_paths))
Edited by Maxim Anisimov