Fix: missing null check

This fixes https://github.com/JacquesLucke/animation_nodes/issues/1827.
This commit is contained in:
Jacques Lucke 2022-02-07 18:16:35 +01:00
parent 2f868e5647
commit eb071e3d3c
1 changed files with 1 additions and 1 deletions

View File

@ -394,7 +394,7 @@ static void send_notifiers_after_tree_change(ID *id, bNodeTree *ntree)
{
WM_main_add_notifier(NC_NODE | NA_EDITED, nullptr);
if (ntree->type == NTREE_SHADER) {
if (ntree->type == NTREE_SHADER && id != nullptr) {
if (GS(id->name) == ID_MA) {
WM_main_add_notifier(NC_MATERIAL | ND_SHADING, id);
}