aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Jarosz2016-02-28 20:32:36 +0100
committerHubert Jarosz2016-03-09 00:16:56 +0100
commit96d6a74e25976c64657c5a060494e667d4ab3643 (patch)
tree38aec29452c199f7eee0518917ca086360798879
parent4b14c18d1334d65c6b1949dfbb554037448fd59f (diff)
downloadgodot-96d6a74e25976c64657c5a060494e667d4ab3643.tar.gz
godot-96d6a74e25976c64657c5a060494e667d4ab3643.tar.zst
godot-96d6a74e25976c64657c5a060494e667d4ab3643.zip
fix possible crash in tools/editor/spatial_editor_gizmos.cpp
spatial_node and base where uninitialized, which could lead to crash
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp4
-rw-r--r--tools/editor/spatial_editor_gizmos.h1
2 files changed, 2 insertions, 3 deletions
diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp
index d4bc701da..3414e8048 100644
--- a/tools/editor/spatial_editor_gizmos.cpp
+++ b/tools/editor/spatial_editor_gizmos.cpp
@@ -708,7 +708,8 @@ void EditorSpatialGizmo::_bind_methods() {
EditorSpatialGizmo::EditorSpatialGizmo() {
valid=false;
billboard_handle=false;
-
+ base=NULL;
+ spatial_node=NULL;
}
EditorSpatialGizmo::~EditorSpatialGizmo(){
@@ -3219,4 +3220,3 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
}
-
diff --git a/tools/editor/spatial_editor_gizmos.h b/tools/editor/spatial_editor_gizmos.h
index 346e36022..0162bcbf7 100644
--- a/tools/editor/spatial_editor_gizmos.h
+++ b/tools/editor/spatial_editor_gizmos.h
@@ -491,4 +491,3 @@ public:
};
#endif // SPATIAL_EDITOR_GIZMOS_H
-