Merge pull request #90874 from Zylann/fix_graph_frame_crash

Fix crash when GraphFrame `sb_to_draw_panel` is not a StyleBoxFlat
This commit is contained in:
Rémi Verschelde 2024-04-19 16:28:24 +02:00
commit 626c6a0ff8
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -118,7 +118,7 @@ void GraphFrame::_notification(int p_what) {
sb_panel_flat->set_border_color(selected ? original_border_color : tint_color.lightened(0.3)); sb_panel_flat->set_border_color(selected ? original_border_color : tint_color.lightened(0.3));
draw_style_box(sb_panel_flat, body_rect); draw_style_box(sb_panel_flat, body_rect);
} else if (sb_panel_texture.is_valid()) { } else if (sb_panel_texture.is_valid()) {
sb_panel_texture = sb_panel_flat->duplicate(); sb_panel_texture = sb_panel_texture->duplicate();
sb_panel_texture->set_modulate(tint_color); sb_panel_texture->set_modulate(tint_color);
draw_style_box(sb_panel_texture, body_rect); draw_style_box(sb_panel_texture, body_rect);
} }