]> git.mxchange.org Git - flightgear.git/commitdiff
I guess we have to ref() ssgStateTable as well as ssgSimpleState.
authorcurt <curt>
Wed, 18 Oct 2000 07:03:49 +0000 (07:03 +0000)
committercurt <curt>
Wed, 18 Oct 2000 07:03:49 +0000 (07:03 +0000)
src/Objects/newmat.cxx

index f6d3ec53ab6ee4089548e619a017036879c3695e..c16f8527c57ef5f6dbdf1f8cc291d3fe10de99b3 100644 (file)
@@ -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();