瀏覽代碼

Fix RayCast2DEditor uninitialized value

node was previously read before being set. Found by Valgrind.
lawnjelly 3 年之前
父節點
當前提交
c8a39f6fb3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/plugins/ray_cast_2d_editor_plugin.h

+ 1 - 1
editor/plugins/ray_cast_2d_editor_plugin.h

@@ -41,7 +41,7 @@ class RayCast2DEditor : public Control {
 
 	UndoRedo *undo_redo = nullptr;
 	CanvasItemEditor *canvas_item_editor = nullptr;
-	RayCast2D *node;
+	RayCast2D *node = nullptr;
 
 	bool pressed = false;
 	Point2 original_cast_to;