mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Clneaup: Node gizmos: check nullptr before flag access
Pull Request: https://projects.blender.org/blender/blender/pulls/137204
This commit is contained in:
parent
82a37e143f
commit
f77245e523
1 changed files with 5 additions and 5 deletions
|
|
@ -99,7 +99,7 @@ static bool WIDGETGROUP_node_transform_poll(const bContext *C, wmGizmoGroupType
|
|||
{
|
||||
SpaceNode *snode = CTX_wm_space_node(C);
|
||||
|
||||
if ((snode->flag & SNODE_BACKDRAW) == 0) {
|
||||
if (snode && (snode->flag & SNODE_BACKDRAW) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -296,7 +296,7 @@ static bool WIDGETGROUP_node_crop_poll(const bContext *C, wmGizmoGroupType * /*g
|
|||
{
|
||||
SpaceNode *snode = CTX_wm_space_node(C);
|
||||
|
||||
if ((snode->flag & SNODE_BACKDRAW) == 0) {
|
||||
if (snode && (snode->flag & SNODE_BACKDRAW) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -478,7 +478,7 @@ static bool WIDGETGROUP_node_box_mask_poll(const bContext *C, wmGizmoGroupType *
|
|||
{
|
||||
SpaceNode *snode = CTX_wm_space_node(C);
|
||||
|
||||
if ((snode->flag & SNODE_BACKDRAW) == 0) {
|
||||
if (snode && (snode->flag & SNODE_BACKDRAW) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -592,7 +592,7 @@ static bool WIDGETGROUP_node_sbeam_poll(const bContext *C, wmGizmoGroupType * /*
|
|||
{
|
||||
SpaceNode *snode = CTX_wm_space_node(C);
|
||||
|
||||
if ((snode->flag & SNODE_BACKDRAW) == 0) {
|
||||
if (snode && (snode->flag & SNODE_BACKDRAW) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -699,7 +699,7 @@ static bool WIDGETGROUP_node_corner_pin_poll(const bContext *C, wmGizmoGroupType
|
|||
{
|
||||
SpaceNode *snode = CTX_wm_space_node(C);
|
||||
|
||||
if ((snode->flag & SNODE_BACKDRAW) == 0) {
|
||||
if (snode && (snode->flag & SNODE_BACKDRAW) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue