The open source, cross platform level editor for idtech games
Go to file
Alex Lo fcefc8b9de Fix crash when deleting a misc_model
The following sequence of events and conditions will cause a segfault to
occur:

1. Delete a misc_model
2. Undo the delete
3. Delete the same model again
4. Undo the delete

A segfault will occur in CEntityMiscModel::Draw when m_model is
dereferenced as it has been deleted and cleared.

When cloning the misc_model entity, a new CEntityMiscModel is created and
the name is set. However, CEntityMiscModel::BuildCacheRequestString relies
on all epairs to be present before being able to generate the *correct*
request string for the misc_model. Not doing so will cause incorrect
behaviour - in this case, the reference count for the CEntityMiscModel is
decremented one too many times and causes the object to be deleted. The
misc_model object is then used later on after it has been freed.

This commit fixes the problem by copying all epairs, before firing the
OnKeyValueChanged events. This way, all epairs will be available when
BuildCacheRequestString is called.
2015-07-21 00:08:31 +01:00
apple Use clang on OS X instead of gcc48 2014-01-19 22:25:08 -07:00
contrib Use clang on OS X instead of gcc48 2014-01-19 22:25:08 -07:00
docs/manual uncrustify! now the code is only ugly on the *inside* 2012-03-17 15:01:54 -05:00
include Added option to change detail brush color in 2d view 2015-01-15 07:14:03 -05:00
install Added a toggle button to the main toolbar for creating Structural/Detail brushes 2013-07-26 22:25:56 +01:00
libs switch to xp compatible compiler toolchain, add/fix an archive and upload script for the VM builder 2013-08-24 22:50:12 +00:00
plugins Fix crash when deleting a misc_model 2015-07-21 00:08:31 +01:00
po Rename surface_ufoai to surface_idtech2. This plugin should be used for all Quake1 / Quake2 derived games. Updated game packs to be checked in shortly. 2013-07-08 22:20:13 -04:00
radiant Add basic quake1 support to preferences.{h,cpp} 2015-05-26 21:23:29 -06:00
regression_tests/q3map2 Adding patch_seam q3map2 regression test. Probably not fixable, but good to 2011-02-26 00:41:18 +00:00
tools Fixed a number of out of bounds accesses. 2013-11-01 00:24:58 +00:00
.cproject Eclipse project file updates. 2015-02-10 10:08:15 -05:00
.gitignore tweak the GL widget font (for windows mostly) 2013-07-05 15:55:09 -05:00
.project Updates for Quake2World -> Quetoo project renaming. 2015-03-08 09:55:36 -04:00
.pydevproject Updates for Quake2World -> Quetoo project renaming. 2015-03-08 09:55:36 -04:00
BSD * eol-style native 2008-06-25 22:07:02 +00:00
CONTRIBUTORS trash a bunch of outdated and confusing things 2012-03-17 14:07:19 -05:00
GPL * eol-style native 2008-06-25 22:07:02 +00:00
LGPL * eol-style native 2008-06-25 22:07:02 +00:00
LICENSE * changed eol-style to native 2008-06-25 22:05:08 +00:00
SConscript.lib Set the default packs, pull the invocation environment into the scons Environment (for pkg-config) 2013-03-30 09:24:40 -05:00
SConscript.module Set the default packs, pull the invocation environment into the scons Environment (for pkg-config) 2013-03-30 09:24:40 -05:00
SConscript.q3data Set the default packs, pull the invocation environment into the scons Environment (for pkg-config) 2013-03-30 09:24:40 -05:00
SConscript.q3map2 Set the default packs, pull the invocation environment into the scons Environment (for pkg-config) 2013-03-30 09:24:40 -05:00
SConscript.q3map2.urt Set the default packs, pull the invocation environment into the scons Environment (for pkg-config) 2013-03-30 09:24:40 -05:00
SConscript.radiant Set the default packs, pull the invocation environment into the scons Environment (for pkg-config) 2013-03-30 09:24:40 -05:00
SConstruct misc 2012-05-27 19:06:21 -05:00
TRANSLATING * some notes for running the translated version of radiant 2008-06-26 11:01:07 +00:00
config.py Updates for Quake2World -> Quetoo project renaming. 2015-03-08 09:55:36 -04:00
install.py eol 2007-11-04 04:09:22 +00:00
makeversion.py eol 2007-11-04 04:09:22 +00:00
prepare_archive.py switch to xp compatible compiler toolchain, add/fix an archive and upload script for the VM builder 2013-08-24 22:50:12 +00:00
radiant.pot Rename surface_ufoai to surface_idtech2. This plugin should be used for all Quake1 / Quake2 derived games. Updated game packs to be checked in shortly. 2013-07-08 22:20:13 -04:00
radiant.sln Remove stale project references from .sln file. 2013-07-09 00:09:02 -04:00
uncrustify.cfg uncrustify config - not applying until more sync with internal versions are done 2008-03-16 15:51:12 +00:00
utils.py add q3data to the build. messed up prev commit 2012-10-07 13:37:16 -05:00