瀏覽代碼

Merge pull request #90874 from Zylann/fix_graph_frame_crash

Fix crash when GraphFrame `sb_to_draw_panel` is not a StyleBoxFlat
Rémi Verschelde 1 年之前
父節點
當前提交
626c6a0ff8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/graph_frame.cpp

+ 1 - 1
scene/gui/graph_frame.cpp

@@ -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));
 					draw_style_box(sb_panel_flat, body_rect);
 				} 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);
 					draw_style_box(sb_panel_texture, body_rect);
 				}