Hi all,

I had the problem for a while now that collada files caused a crash, I had
this when exporting from blender and using textures under some
circumstances (complex to describe).

I allways ignored the problem an just fixed the models in blender. Right
now I am working on a tool with Gui and everything.. not so nice if it
crashes because user input ;)

I added a line in
Source/System/FileIO/Collada/OSGColladaSurface.cpp

-------------- Source/System/FileIO/Collada/OSGColladaSurface.cpp
--------------
index 0de1165..1daaad8 100644
@@ -172,6 +172,8 @@ ColladaSurface::read2D(domFx_surface_common *surface)
         }

         daeElementRef      imageElem =
initFroms[0]->getValue().getElement();
+        if (imageElem == 0) return;
+
         domImageRef        image     = daeSafeCast<domImage>(imageElem);
         ColladaImageRefPtr colImage  = getUserDataAs<ColladaImage>(image);

@@ -182,7 +184,7 @@ ColladaSurface::read2D(domFx_surface_common *surface)

             colImage->read(this);
         }

         _image = colImage->getImage();
     }
 }

this helps me at least.. I don't know how this will impact the whole
loading process..


Best Regards,
Victor
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to