Fixed issue that improperly initialized visual node properties to Nil
This commit is contained in:
parent
ad44b3d522
commit
7fb57ecbd9
@ -1236,6 +1236,11 @@ void VisualScriptBuiltinFunc::_bind_methods() {
|
||||
BIND_ENUM_CONSTANT(FUNC_MAX);
|
||||
}
|
||||
|
||||
VisualScriptBuiltinFunc::VisualScriptBuiltinFunc(VisualScriptBuiltinFunc::BuiltinFunc func) {
|
||||
|
||||
this->func = func;
|
||||
}
|
||||
|
||||
VisualScriptBuiltinFunc::VisualScriptBuiltinFunc() {
|
||||
|
||||
func = MATH_SIN;
|
||||
@ -1244,9 +1249,7 @@ VisualScriptBuiltinFunc::VisualScriptBuiltinFunc() {
|
||||
template <VisualScriptBuiltinFunc::BuiltinFunc func>
|
||||
static Ref<VisualScriptNode> create_builtin_func_node(const String &p_name) {
|
||||
|
||||
Ref<VisualScriptBuiltinFunc> node;
|
||||
node.instance();
|
||||
node->set_func(func);
|
||||
Ref<VisualScriptBuiltinFunc> node = memnew(VisualScriptBuiltinFunc(func));
|
||||
return node;
|
||||
}
|
||||
|
||||
|
@ -130,6 +130,7 @@ public:
|
||||
|
||||
virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
|
||||
|
||||
VisualScriptBuiltinFunc(VisualScriptBuiltinFunc::BuiltinFunc func);
|
||||
VisualScriptBuiltinFunc();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user