Browse Source

fix compile warning

rdb 14 years ago
parent
commit
ee03d5c45d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      panda/src/pgraph/nodePath.cxx

+ 4 - 1
panda/src/pgraph/nodePath.cxx

@@ -3921,13 +3921,16 @@ get_shader_input(InternalName *id) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 const int NodePath::
 const int NodePath::
 get_instance_count() const {
 get_instance_count() const {
-  nassertr_always(!is_empty(), NULL);
+  nassertr_always(!is_empty(), 0);
+
   const RenderAttrib *attrib =
   const RenderAttrib *attrib =
     node()->get_attrib(ShaderAttrib::get_class_slot());
     node()->get_attrib(ShaderAttrib::get_class_slot());
+
   if (attrib != (const RenderAttrib *)NULL) {
   if (attrib != (const RenderAttrib *)NULL) {
     const ShaderAttrib *sa = DCAST(ShaderAttrib, attrib);
     const ShaderAttrib *sa = DCAST(ShaderAttrib, attrib);
     return sa->get_instance_count();
     return sa->get_instance_count();
   }
   }
+
   return 0;
   return 0;
 }
 }