summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/reference.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/reference.cpp b/core/reference.cpp
index c55f8a7fe3..060608eacb 100644
--- a/core/reference.cpp
+++ b/core/reference.cpp
@@ -74,7 +74,8 @@ bool Reference::unreference() {
bool die = refcount.unref();
if (get_script_instance()) {
- die = die && get_script_instance()->refcount_decremented();
+ bool script_ret = get_script_instance()->refcount_decremented();
+ die = die && script_ret;
}
return die;