Go to file
Julian Smith 1d978429f5 simgear/props/props.cxx: Avoid possible SEGV e.g. if listener removes itself.
simgear/props/props_test.cxx: test for self-unregister.

SGPropertyNode::removeChangeListener() used to modify the _listeners vector or
even delete it and set _listeners to NULL, if a listener was removed.

This could cause a SEGV if removeChangeListener() was called from
a listener, because listeners are called from methods such as
SGPropertyNode::fireValueChanged() which iterate through _listeners and don't
expect it to be changed to NULL.

The fix here is to keep a track of whether we are iterating through the
_listeners vector; if we are, SGPropertyNode::removeChangeListener() sets the
entry to NULL, instead of removing it.

We have a new internal function forEachListener() which takes
care of the iterating details - incrementing/decrementing the new
_listeners->_num_iterators count and skipping NULL entries. Before returning,
if _num_iterators is now zero it removes any NULL entries in the vector of
listeners.

The nListeners() member is no longer inline, because it needs to ignore NULL
entries in the vector. And _listeners now points to an internally-defined
struct which contains a new _num_iterators as well as the vector of listeners.

Added self-unregister test to simgear/props/props_test.cxx.
2020-06-13 18:11:49 +01:00
3rdparty Use alternative name for internal expat_config.h 2019-10-05 17:19:09 +01:00
CMakeModules CMake logic to export debug symbols 2020-04-05 14:04:19 +01:00
simgear simgear/props/props.cxx: Avoid possible SEGV e.g. if listener removes itself. 2020-06-13 18:11:49 +01:00
.gitignore Add NetBeans .gitignore 2019-12-24 20:58:48 +00:00
AUTHORS Added Curt to empty Authors file as CVS test. 2001-12-11 22:23:25 +00:00
ChangeLog Let the version number reflect the current state of the release process. 2010-01-21 06:15:18 +01:00
CMakeLists.txt Fix CMake value 2020-06-05 13:53:54 +01:00
COPYING Fix rpmlint/Linux packager complaints 2012-05-05 00:30:16 +02:00
Doxyfile Fix conditional compile logic 2019-12-15 00:18:39 -06:00
DoxygenMain.cxx Various doxygen improvements/fixes. 2018-01-12 08:32:04 +01:00
INSTALL Remove plib dep references from documentation files 2012-08-29 12:08:27 +02:00
NEWS Attempt to sort out the version number mess in preparation for a 1.9.0 release. 2008-12-19 20:39:59 +00:00
README Update README/INSTALL documentation. 2012-06-26 22:43:48 +02:00
README.cmake Remove plib dep references from documentation files 2012-08-29 12:08:27 +02:00
README.OSG Update README/INSTALL documentation. 2012-06-26 22:43:48 +02:00
README.sound Detect AeonWave and if it is installed use it, otherwise fall back to OpenAL. Also let get_available_devices() use C++ strings instead of const char* 2018-06-02 14:06:15 +02:00
README.zlib Updates to remove unneeded and old version of zlib source. 2006-03-23 21:59:59 +00:00
SimGearConfig.cmake.in - When HLA is enabled in Simgear, HLA is also enabled in Flightgear 2020-03-15 22:29:43 +00:00
Thanks SimGear: Typo in Thanks file 2007-07-23 22:00:31 +00:00
version new version: 2020.2.0 2020-04-27 09:29:55 +01:00

SimGear - Simulator Construction Tools
======================================
http://www.flightgear.org

SimGear is a set of open-source libraries designed to be used as building
blocks for quickly assembling 3d simulations, games, and visualization
applications.

SimGear is developed by the FlightGear project and also provides the base
for the FlightGear Flight Simulator.

Source code for SimGear is released under the GNU Library General Public
License (LGPL) - see COPYING for license details.

See INSTALL file for help on building SimGear.