Fix T40482: Cycles matlib file crashes
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 4 Jun 2014 20:29:48 +0000 (02:29 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 4 Jun 2014 20:33:21 +0000 (02:33 +0600)
commitdc2daf7a6786110a77cebc5ad8ea7a118d156d61
tree982bcb02159708ded6586f34445abb20d84e3b8b
parent9b3efa912a24de57aa58f5dd62291c5654504d8c
Fix T40482: Cycles matlib file crashes

it's possible that runtime optimizer would call get_attribute
with NULL renderstate. As per documentation, it's valid to
return false in that cases and in worst case we'll just miss
some possible optimization.

Supporting such cases would require some bigger changes to
Cycles since attributes are only set to up for the kernel
after shader compilation.

Thanks Brecht for review!
intern/cycles/kernel/osl/osl_services.cpp