Browse Source

dxgsg9: fix compile error due to WeakPointerTo changes

rdb 7 years ago
parent
commit
8eeab7a26a
2 changed files with 5 additions and 2 deletions
  1. 2 2
      panda/src/dxgsg9/dxGeomMunger9.I
  2. 3 0
      panda/src/dxgsg9/dxGeomMunger9.cxx

+ 2 - 2
panda/src/dxgsg9/dxGeomMunger9.I

@@ -31,6 +31,6 @@ DXGeomMunger9(GraphicsStateGuardian *gsg, const RenderState *state) :
   }
   }
   // Set a callback to unregister ourselves when either the Texture or the
   // Set a callback to unregister ourselves when either the Texture or the
   // TexGen object gets deleted.
   // TexGen object gets deleted.
-  _texture.set_callback(this);
-  _tex_gen.set_callback(this);
+  _texture.add_callback(this);
+  _tex_gen.add_callback(this);
 }
 }

+ 3 - 0
panda/src/dxgsg9/dxGeomMunger9.cxx

@@ -28,6 +28,9 @@ DXGeomMunger9::
     unref_delete(_filtered_texture);
     unref_delete(_filtered_texture);
     _reffed_filtered_texture = false;
     _reffed_filtered_texture = false;
   }
   }
+
+  _texture.remove_callback(this);
+  _tex_gen.remove_callback(this);
 }
 }
 
 
 /**
 /**