File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -157,9 +157,13 @@ void CanvasItemMaterial::flush_changes() {
157157}
158158
159159void CanvasItemMaterial::_queue_shader_change () {
160+ if (!_is_initialized ()) {
161+ return ;
162+ }
163+
160164 MutexLock lock (material_mutex);
161165
162- if (_is_initialized () && !element.in_list ()) {
166+ if (!element.in_list ()) {
163167 dirty_materials.add (&element);
164168 }
165169}
Original file line number Diff line number Diff line change @@ -1886,9 +1886,13 @@ void BaseMaterial3D::flush_changes() {
18861886}
18871887
18881888void BaseMaterial3D::_queue_shader_change () {
1889+ if (!_is_initialized ()) {
1890+ return ;
1891+ }
1892+
18891893 MutexLock lock (material_mutex);
18901894
1891- if (_is_initialized () && !element.in_list ()) {
1895+ if (!element.in_list ()) {
18921896 dirty_materials.add (&element);
18931897 }
18941898}
Original file line number Diff line number Diff line change @@ -1164,9 +1164,13 @@ void ParticleProcessMaterial::flush_changes() {
11641164}
11651165
11661166void ParticleProcessMaterial::_queue_shader_change () {
1167+ if (!_is_initialized ()) {
1168+ return ;
1169+ }
1170+
11671171 MutexLock lock (material_mutex);
11681172
1169- if (_is_initialized () && !element.in_list ()) {
1173+ if (!element.in_list ()) {
11701174 dirty_materials.add (&element);
11711175 }
11721176}
You can’t perform that action at this time.
0 commit comments