From a3a7fb83e645112eb2b7f6620cda9fbaf434311a Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 5 Aug 2017 19:48:29 -0300 Subject: Made bool constructor explicit in Variant to avoid bugs, fixes #7843 --- core/object.cpp | 19 +++++++++++++------ core/object.h | 4 ++-- core/resource.cpp | 1 + core/variant.h | 4 ++-- scene/3d/visibility_notifier.cpp | 2 ++ 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/core/object.cpp b/core/object.cpp index 316c624268..525eb2ff38 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1182,10 +1182,10 @@ Variant Object::_emit_signal(const Variant **p_args, int p_argcount, Variant::Ca return Variant(); } -void Object::emit_signal(const StringName &p_name, const Variant **p_args, int p_argcount) { +Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int p_argcount) { if (_block_signals) - return; //no emit, signals blocked + return ERR_CANT_AQUIRE_RESOURCE; //no emit, signals blocked Signal *s = signal_map.getptr(p_name); if (!s) { @@ -1194,11 +1194,11 @@ void Object::emit_signal(const StringName &p_name, const Variant **p_args, int p //check in script if (!signal_is_valid && !script.is_null() && !Ref