diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2022-09-12 14:55:40 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2022-09-20 10:19:49 +0300 |
commit | 22b69ed08f7b57a5ba6a53322481f984511b3ecf (patch) | |
tree | 17bbea2c686ca45223b0fd717662d24399b3a0f4 /source/blender/blenlib | |
parent | e00f76c6a8ccaafbdd09b069923176ad23e3ce7e (diff) |
Fix T101001: crash setting texture node active in certain cases
Code from {rBb0cb0a785475} assumed a texture node `node->id` would
always be an image.
That is not true though:
- could be an object (as reported here with the Point Density node)
- could be a textblock (as in the IES Texture node)
Acting on these would crash when doing `BKE_image_signal` on them.
Now check node id is an image and do nothing otherwise.
Also check if an image is actually set in these nodes (if none is, the
Image Editor is now also untouched, previously the image in the Image
Editor was "cleared" here [set to NULL] -- which does not seems very
beneficial)
Maniphest Tasks: T101001
Differential Revision: https://developer.blender.org/D15943
Diffstat (limited to 'source/blender/blenlib')
0 files changed, 0 insertions, 0 deletions