From: curt Date: Wed, 18 Oct 2000 07:03:49 +0000 (+0000) Subject: I guess we have to ref() ssgStateTable as well as ssgSimpleState. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=445c4bbdb1f624c1fe246063df69fdc59fb09781;p=flightgear.git I guess we have to ref() ssgStateTable as well as ssgSimpleState. --- diff --git a/src/Objects/newmat.cxx b/src/Objects/newmat.cxx index f6d3ec53a..c16f8527c 100644 --- a/src/Objects/newmat.cxx +++ b/src/Objects/newmat.cxx @@ -75,6 +75,7 @@ void FGNewMat::build_ssg_state( const string& path, tex_file.append( texture_name ); state = new ssgStateSelector(2); + state->ref(); textured = new ssgSimpleState(); textured->ref(); @@ -133,6 +134,8 @@ void FGNewMat::build_ssg_state( const string& path, void FGNewMat::set_ssg_state( ssgSimpleState *s ) { state = new ssgStateSelector(2); + state->ref(); + textured = s; nontextured = new ssgSimpleState();