From 1112bd33ced236a65bd7a9b0fc7def261c37749e Mon Sep 17 00:00:00 2001 From: Lorenzo Pivetta <lorenzo.pivetta@elettra.eu> Date: Mon, 3 Aug 2020 16:21:54 +0200 Subject: [PATCH] Add tg NULL init and test --- src/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 57d09b9..eb1d6c5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,7 +37,7 @@ int main(int argc,char *argv[]) { - Tango::Util *tg; + Tango::Util *tg = NULL; Tango::Util::_daemon = true; Tango::Util::_sleep_between_connect = 10; @@ -71,7 +71,9 @@ int main(int argc,char *argv[]) cout << "Received a CORBA_Exception" << endl; cout << "Exiting" << endl; } - tg->server_cleanup(); + if (tg != NULL) { + tg->server_cleanup(); + } return(0); } -- GitLab