This is the case of osmo-nitb, since it does not call
osmo_bsc_rf_create().

term1: $ ./osmo-nitb -c ../openbsc.cfg.nanobts
term2: $ telnet localhost 4242
term2: OpenBSC> show network
term1: Segmentation fault
---
 openbsc/src/libbsc/bsc_vty.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index c0909db..1afaed3 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -189,7 +189,7 @@ static void net_dump_vty(struct vty *vty, struct 
gsm_network *net)
        dump_pchan_load_vty(vty, "    ", &pl);
 
        /* show rf */
-       if (net->msc_data)
+       if (net->msc_data && net->msc_data->rf_ctl)
                vty_out(vty, "  Last RF Command: %s%s",
                        net->msc_data->rf_ctl->last_state_command,
                        VTY_NEWLINE);


Reply via email to