From 445c4bbdb1f624c1fe246063df69fdc59fb09781 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 18 Oct 2000 07:03:49 +0000 Subject: [PATCH] I guess we have to ref() ssgStateTable as well as ssgSimpleState. --- src/Objects/newmat.cxx | 3 +++ 1 file changed, 3 insertions(+) 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(); -- 2.39.5