Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
3275e848
Commit
3275e848
authored
Mar 05, 2020
by
Thakee Nathees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix EditorFolding crash when switching scenes
parent
f05bbe69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
editor_folding.cpp
editor/editor_folding.cpp
+2
-0
editor_node.cpp
editor/editor_node.cpp
+1
-1
No files found.
editor/editor_folding.cpp
View file @
3275e848
...
@@ -133,6 +133,8 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p
...
@@ -133,6 +133,8 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p
}
}
void
EditorFolding
::
save_scene_folding
(
const
Node
*
p_scene
,
const
String
&
p_path
)
{
void
EditorFolding
::
save_scene_folding
(
const
Node
*
p_scene
,
const
String
&
p_path
)
{
ERR_FAIL_NULL
(
p_scene
);
FileAccessRef
file_check
=
FileAccess
::
create
(
FileAccess
::
ACCESS_RESOURCES
);
FileAccessRef
file_check
=
FileAccess
::
create
(
FileAccess
::
ACCESS_RESOURCES
);
if
(
!
file_check
->
file_exists
(
p_path
))
//This can happen when creating scene from FilesystemDock. It has path, but no file.
if
(
!
file_check
->
file_exists
(
p_path
))
//This can happen when creating scene from FilesystemDock. It has path, but no file.
return
;
return
;
...
...
editor/editor_node.cpp
View file @
3275e848
...
@@ -3279,7 +3279,7 @@ void EditorNode::_clear_undo_history() {
...
@@ -3279,7 +3279,7 @@ void EditorNode::_clear_undo_history() {
void
EditorNode
::
set_current_scene
(
int
p_idx
)
{
void
EditorNode
::
set_current_scene
(
int
p_idx
)
{
//Save the folding in case the scene gets reloaded.
//Save the folding in case the scene gets reloaded.
if
(
editor_data
.
get_scene_path
(
p_idx
)
!=
""
)
if
(
editor_data
.
get_scene_path
(
p_idx
)
!=
""
&&
editor_data
.
get_edited_scene_root
(
p_idx
)
)
editor_folding
.
save_scene_folding
(
editor_data
.
get_edited_scene_root
(
p_idx
),
editor_data
.
get_scene_path
(
p_idx
));
editor_folding
.
save_scene_folding
(
editor_data
.
get_edited_scene_root
(
p_idx
),
editor_data
.
get_scene_path
(
p_idx
));
if
(
editor_data
.
check_and_update_scene
(
p_idx
))
{
if
(
editor_data
.
check_and_update_scene
(
p_idx
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment