Fix crash when you pass invalid parameter to ImageTexture.set_data
(cherry picked from commit bde962dbdd
)
This commit is contained in:
parent
ff35310650
commit
d2bf31bdad
|
@ -230,6 +230,8 @@ void ImageTexture::load(const String &p_path) {
|
|||
|
||||
void ImageTexture::set_data(const Ref<Image> &p_image) {
|
||||
|
||||
ERR_FAIL_COND(p_image.is_null());
|
||||
|
||||
VisualServer::get_singleton()->texture_set_data(texture, p_image);
|
||||
|
||||
_change_notify();
|
||||
|
|
Loading…
Reference in New Issue