Fix crash on closedown.
authorCarl Hetherington <carl@carlh.net>
Sat, 13 Nov 2010 22:50:03 +0000 (22:50 +0000)
committerCarl Hetherington <carl@carlh.net>
Sat, 13 Nov 2010 22:50:03 +0000 (22:50 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8022 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/port.cc

index 4ae9b03c3b88b11db4d54f0744baee4e40683049..55481faa64098564672e08aa673d71117b8c4e5f 100644 (file)
@@ -63,7 +63,9 @@ Port::Port (std::string const & n, DataType t, Flags f)
 /** Port destructor */
 Port::~Port ()
 {
-       jack_port_unregister (_engine->jack (), _jack_port);
+       if (_engine->jack ()) {
+               jack_port_unregister (_engine->jack (), _jack_port);
+       }
 }
 
 /** @return true if this port is connected to anything */