From 1aa484aee5af0dcd89fcc5be9248f9d59363b3c0 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Fri, 6 Aug 2010 08:44:34 +0200 Subject: [PATCH] Fix segfault on invalid command line arguments If FlightGear terminated before the FDM was instantiated it crashed. --- src/FDM/fdm_shell.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FDM/fdm_shell.cxx b/src/FDM/fdm_shell.cxx index bec319c09..a4cfad309 100644 --- a/src/FDM/fdm_shell.cxx +++ b/src/FDM/fdm_shell.cxx @@ -98,7 +98,7 @@ void FDMShell::bind() void FDMShell::unbind() { - _impl->unbind(); + if( _impl ) _impl->unbind(); } void FDMShell::update(double dt)