Merge pull request #11650 from kitsune/fix-range-unshare-crash
Fix crash when unsharing a range that is not shared
This commit is contained in:
commit
c96fc380e5
@ -208,11 +208,13 @@ void Range::_ref_shared(Shared *p_shared) {
|
||||
|
||||
void Range::_unref_shared() {
|
||||
|
||||
if (shared) {
|
||||
shared->owners.erase(this);
|
||||
if (shared->owners.size() == 0) {
|
||||
memdelete(shared);
|
||||
shared = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Range::_bind_methods() {
|
||||
|
Loading…
Reference in New Issue
Block a user