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
c96f08dc
Unverified
Commit
c96f08dc
authored
Jan 24, 2020
by
Rémi Verschelde
Committed by
GitHub
Jan 24, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #35527 from neikeq/issue-35259
Mono/C#: Fix _update_exports possible crash with Reference types
parents
75ab0754
966a1261
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
csharp_script.cpp
modules/mono/csharp_script.cpp
+4
-1
No files found.
modules/mono/csharp_script.cpp
View file @
c96f08dc
...
...
@@ -2425,6 +2425,9 @@ bool CSharpScript::_update_exports() {
top
=
top
->
get_parent_class
();
}
// Need to check this here, before disposal
bool
base_ref
=
Object
::
cast_to
<
Reference
>
(
tmp_native
)
!=
NULL
;
// Dispose the temporary managed instance
MonoException
*
exc
=
NULL
;
...
...
@@ -2438,7 +2441,7 @@ bool CSharpScript::_update_exports() {
MonoGCHandle
::
free_handle
(
tmp_pinned_gchandle
);
tmp_object
=
NULL
;
if
(
tmp_native
&&
!
Object
::
cast_to
<
Reference
>
(
tmp_native
)
)
{
if
(
tmp_native
&&
!
base_ref
)
{
Node
*
node
=
Object
::
cast_to
<
Node
>
(
tmp_native
);
if
(
node
&&
node
->
is_inside_tree
())
{
ERR_PRINTS
(
"Temporary instance was added to the scene tree."
);
...
...
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