From dd7d54cfccb34076b46f3f51e7fe872b199b90a9 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Mon, 13 Nov 2017 19:08:05 +0100 Subject: [PATCH] Do not crash when specifying an unsupported transport medium for an I/O protocol. --- src/Main/fg_io.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Main/fg_io.cxx b/src/Main/fg_io.cxx index c75138e91..a1df491ff 100644 --- a/src/Main/fg_io.cxx +++ b/src/Main/fg_io.cxx @@ -328,6 +328,12 @@ FGIO::parse_port_config( const string& config ) io->set_io_channel( new SGSocket( hostname, port, style ) ); } + else + { + SG_LOG( SG_IO, SG_ALERT, "Unknown transport medium \"" << medium << "\" in \"" << config << "\""); + delete io; + return NULL; + } return io; }