2
0
Fork 0

Merge pull request #20440 from Chaosus/fixtexturecrash

Fix game crash when you pass invalid or null parameter to ImageTexture.set_data
3.1
Max Hilbrunner 2018-07-25 12:00:49 +07:00 committed by GitHub
commit 46985ae075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

@ -235,6 +235,8 @@ Error 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();