Merge pull request #54057 from skimmedsquare/procedural-sky-thread-done-crash-53621

This commit is contained in:
Rémi Verschelde 2021-10-21 12:00:07 +02:00 committed by GitHub
commit b7ded89fe9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -390,6 +390,8 @@ void ProceduralSky::_queue_update() {
}
void ProceduralSky::_thread_done(const Ref<Image> &p_image) {
ERR_FAIL_COND(p_image.is_null());
panorama = p_image;
VS::get_singleton()->texture_allocate(texture, panorama->get_width(), panorama->get_height(), 0, Image::FORMAT_RGBE9995, VS::TEXTURE_TYPE_2D, VS::TEXTURE_FLAG_FILTER | VS::TEXTURE_FLAG_REPEAT);
VS::get_singleton()->texture_set_data(texture, panorama);