mncc: Do not use bts->nr as it might be NULL.
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index b5ab8aa..d1789aa 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -2921,7 +2921,7 @@
 	int i, rc = 0;
 	struct gsm_trans *trans = NULL, *transt;
 	struct gsm_subscriber_connection *conn = NULL;
-	struct gsm_bts *bts = NULL;
+	struct gsm_bts *bts;
 	struct gsm_mncc *data = arg, rel;
 
 	DEBUGP(DMNCC, "receive message %s\n", get_mncc_name(msg_type));
@@ -3051,7 +3051,8 @@
 				DEBUGP(DCC, "(bts %d trx - ts - ti -- sub %s) "
 					"Received '%s' from MNCC with "
 					"unallocated channel, paging already "
-					"started.\n", bts->nr,
+					"started.\n",
+					trans->conn->lchan->ts->trx->bts->nr,
 					data->called.number,
 					get_mncc_name(msg_type));
 				subscr_put(subscr);