Browse Source

fix possible crash in tools/editor/spatial_editor_gizmos.cpp

spatial_node and base where uninitialized, which could lead to crash
Hubert Jarosz 9 years ago
parent
commit
96d6a74e25
2 changed files with 2 additions and 3 deletions
  1. 2 2
      tools/editor/spatial_editor_gizmos.cpp
  2. 0 1
      tools/editor/spatial_editor_gizmos.h

+ 2 - 2
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() {
 
 
 }
-

+ 0 - 1
tools/editor/spatial_editor_gizmos.h

@@ -491,4 +491,3 @@ public:
 };
 
 #endif // SPATIAL_EDITOR_GIZMOS_H
-