summaryrefslogtreecommitdiffstats
path: root/src/network.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network.c')
-rw-r--r--src/network.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network.c b/src/network.c
index 1233c84a..d3806083 100644
--- a/src/network.c
+++ b/src/network.c
@@ -339,7 +339,7 @@ static char *get_operator_display_name(struct ofono_modem *modem)
{
struct network_registration_data *netreg = modem->network_registration;
struct network_operator_data *current = netreg->current_operator;
- struct ofono_network_operator *op = current->info;
+ struct ofono_network_operator *op;
const char *plmn;
static char name[1024];
int len = sizeof(name);
@@ -349,11 +349,13 @@ static char *get_operator_display_name(struct ofono_modem *modem)
* PLMN or roaming and on configuration bits from the SIM, all
* together there are four cases to consider. */
- if (!netreg->current_operator) {
+ if (!current) {
g_strlcpy(name, "", len);
return name;
}
+ op = current->info;
+
plmn = op->name;
if (current->eons_info && current->eons_info->longname)
plmn = current->eons_info->longname;