summaryrefslogtreecommitdiffstats
path: root/src/vat/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vat/main.c')
-rw-r--r--src/vat/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vat/main.c b/src/vat/main.c
index aa990a31d93..723c5e8cc3a 100644
--- a/src/vat/main.c
+++ b/src/vat/main.c
@@ -389,7 +389,7 @@ main (int argc, char **argv)
if (vam->socket_name && vat_socket_connect (vam))
fformat (stderr, "WARNING: socket connection failed");
- if (vam->socket_client_main.socket_fd == 0
+ if ((!vam->socket_client_main || vam->socket_client_main->socket_fd == 0)
&& connect_to_vpe ("vpp_api_test") < 0)
{
svm_region_exit ();