]> git.mxchange.org Git - flightgear.git/commitdiff
Fix segfault on invalid command line arguments
authorTorsten Dreyer <Torsten@t3r.de>
Fri, 6 Aug 2010 06:44:34 +0000 (08:44 +0200)
committerTorsten Dreyer <Torsten@t3r.de>
Fri, 6 Aug 2010 06:44:34 +0000 (08:44 +0200)
If FlightGear terminated before the FDM was instantiated it crashed.

src/FDM/fdm_shell.cxx

index bec319c0981847638912233c0e5ebe963df5d512..a4cfad3098969198a5d60a3e765b8ae4ae27cbd8 100644 (file)
@@ -98,7 +98,7 @@ void FDMShell::bind()
 
 void FDMShell::unbind()
 {
-  _impl->unbind();
+  if( _impl ) _impl->unbind();
 }
 
 void FDMShell::update(double dt)