Blender Git Loki
Git Commits -> Revision 70e16b3
Revision 70e16b3 by Lukas Stockner (master) January 16, 2016, 00:32 (GMT) |
Fix T47181: Blender OSL script node crash (OSL 1.6.9) Compiling OSL scripts with errors in them would cause Blender to crash since the OSL version bump to 1.6.9 instead of printing the error to the console as it did before. With version 1.6.2, OSL added a pointer to an OpenImageIO ErrorHandler as an argument to the OSLCompiler constructor. However, since it defaults to the NULL pointer, Blender still compiled fine after the OSL version bump. It turns out, though, that this pointer is used without further checks inside the OSL code, which makes it crash when it tries to report an error unless a valid ErrorHandler pointer is specified. Therefore, this commit simply passes a pointer to the static default handler that OIIO offers, which prints the error to the console just like OSL did before. Using this feature for a more advanced error handling and displaying from the Blender side would be possible and seems reasonable, but for now it's not really relevant for fixing this bug. |
Commit Details:
Full Hash: 70e16b3c99d3d81837c1b00bb1faaa143dc214ec
Parent Commit: 9a76354
Lines Changed: +1, -1
1 Modified Path:
/intern/cycles/render/osl.cpp (+1, -1) (Diff)