Browse Source

Fix crash with .dae's exported from FX Composer

rdb 16 years ago
parent
commit
87a4dbdf8b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pandatool/src/daeegg/daeMaterials.cxx

+ 1 - 1
pandatool/src/daeegg/daeMaterials.cxx

@@ -233,7 +233,7 @@ void DaeMaterials::
 apply_to(const string semantic, const PT(EggGroup) to) {
 apply_to(const string semantic, const PT(EggGroup) to) {
   if (_materials.count(semantic) > 0) {
   if (_materials.count(semantic) > 0) {
     PT(DaeBlendSettings) blend = _materials[semantic]->_blend;
     PT(DaeBlendSettings) blend = _materials[semantic]->_blend;
-    if (blend->_enabled) {
+    if (blend && blend->_enabled) {
       to->set_blend_mode(EggGroup::BM_add);
       to->set_blend_mode(EggGroup::BM_add);
       to->set_blend_color(blend->_color);
       to->set_blend_color(blend->_color);
       to->set_blend_operand_a(blend->_operand_a);
       to->set_blend_operand_a(blend->_operand_a);