Hi,

I still get segfaults at this position (in the plib-branch). Commenting 
the delete calls seem to stop them, but we get a memory leak this way.

Anyone else having segfaults?

Maik


Maik Justus schrieb am 05.01.2007 11:16:
> Hello,
>
> sometimes I get a segfault in function 
> SGShaderAnimation::~SGShaderAnimation(), file 
> simgear/scene/model/shadanim.cxx.
>
> Please commit the attached patch.
>
> Maik
> ------------------------------------------------------------------------
>
> Index: simgear/scene/model/shadanim.cxx
> ===================================================================
> RCS file: /var/cvs/SimGear-0.3/source/simgear/scene/model/shadanim.cxx,v
> retrieving revision 1.7
> diff -u -p -r1.7 shadanim.cxx
> --- simgear/scene/model/shadanim.cxx  1 Jul 2006 20:06:05 -0000       1.7
> +++ simgear/scene/model/shadanim.cxx  5 Jan 2007 10:02:28 -0000
> @@ -617,9 +617,9 @@ void SGShaderAnimation::init()
>  
>  SGShaderAnimation::~SGShaderAnimation()
>  {
> -    delete _condition;
> -    delete _effectTexture;
> -    delete _textureData;
> +    if (_condition) {delete _condition; _condition=0;}
> +    if (_effectTexture) {delete _effectTexture; _effectTexture=0;}
> +    if (_textureData) {delete _textureData; _textureData=0;}
>  }
>  
>  int
>   
> ------------------------------------------------------------------------


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to