Browse Source

fix crash

David Rose 20 years ago
parent
commit
f0862e7d8c
1 changed files with 3 additions and 3 deletions
  1. 3 3
      panda/src/framework/windowFramework.cxx

+ 3 - 3
panda/src/framework/windowFramework.cxx

@@ -1153,9 +1153,6 @@ void WindowFramework::
 create_anim_controls() {
 create_anim_controls() {
   destroy_anim_controls();
   destroy_anim_controls();
 
 
-  AnimControl *control = _anim_controls.get_anim(_anim_index);
-  nassertv(control != (AnimControl *)NULL);
-
   PT(PGItem) group = new PGItem("anim_controls_group");
   PT(PGItem) group = new PGItem("anim_controls_group");
   PGFrameStyle style;
   PGFrameStyle style;
   style.set_type(PGFrameStyle::T_flat);
   style.set_type(PGFrameStyle::T_flat);
@@ -1179,6 +1176,9 @@ create_anim_controls() {
     return;
     return;
   }
   }
 
 
+  AnimControl *control = _anim_controls.get_anim(_anim_index);
+  nassertv(control != (AnimControl *)NULL);
+
   PT(TextNode) label = new TextNode("anim_name");
   PT(TextNode) label = new TextNode("anim_name");
   label->set_align(TextNode::A_left);
   label->set_align(TextNode::A_left);
   label->set_text(_anim_controls.get_anim_name(_anim_index));
   label->set_text(_anim_controls.get_anim_name(_anim_index));