Do not crash when specifying an unsupported transport medium for an I/O protocol.
This commit is contained in:
parent
2bf5a96aec
commit
dd7d54cfcc
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue