jsoninfo: fix a crash when there are no gateways