SITL: Remove pointer check before delete

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2021-02-03 11:13:58 -03:00 committed by Peter Barker
parent 61bcbfea14
commit ba293084e3
1 changed files with 2 additions and 3 deletions

View File

@ -155,9 +155,8 @@ bool FlightAxis::soap_request_start(const char *action, const char *fmt, ...)
va_end(ap);
// open SOAP socket to FlightAxis
if (sock) {
delete sock;
}
sock = new SocketAPM(false);
if (!sock->connect(controller_ip, controller_port)) {
::printf("connect failed\n");