Fix potential null exception in screen button without texture assigned
This commit is contained in:
parent
b324ff7ea5
commit
fd13b25d6e
@ -242,8 +242,8 @@ void TouchScreenButton::_input(const InputEvent& p_event) {
|
|||||||
touched=true;
|
touched=true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (!texture.is_null())
|
||||||
touched=Rect2(Point2(),texture->get_size()).has_point(coord);
|
touched=Rect2(Point2(),texture->get_size()).has_point(coord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user