Mesh: Fix crash due to derefence of NULL pointer
This patch fix the crash occured due to dererencing without null check
(gdb) bt
0 0xf7051b4a in g_slist_length () from /lib/libglib-2.0.so.0
1 0xf716ab6c in __bt_mesh_destroy_network_handles (net=net@entry=0x1fc9100) at /usr/src/debug/capi-network-bluetooth-0.6.0/src/bluetooth-mesh.c:869
2 0xf716ae14 in __bt_mesh_destroy_network_handles (net=0x1fc9100) at /usr/src/debug/capi-network-bluetooth-0.6.0/src/bluetooth-mesh.c:854
3 __mesh_unload_network_configurations (data=0x1fc9100, user_data=<optimized out>) at /usr/src/debug/capi-network-bluetooth-0.6.0/src/bluetooth-mesh.c:709
4 0xf7051b6c in g_slist_foreach () from /lib/libglib-2.0.so.0
5 0xf716bc9e in bt_mesh_deinitialize () at /usr/src/debug/capi-network-bluetooth-0.6.0/src/bluetooth-mesh.c:731
Change-Id: I25aee100d88f4fa281cdeb6f04b64bf6d60184ff
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>