Repository: godot
Issue: Godot crashes when using CurveTexture::set_curve
Labels: bug,topic:core,crash

**Godot version:**
3.2.alpha.custom_build. 1fed266bf
**OS/device including version:**
Ubuntu 19.04
**Issue description:**

The minimal project is very, very big because Godot crashes very rarely, sometimes after 5s but sometimes doesn't crash after 10 min.

Backtrace:
```
core/vmap.h:86:21: runtime error: member access within null pointer of type 'const struct Pair'
core/vmap.h:86:21: runtime error: member call on null pointer of type 'const struct Target'
core/vmap.h:86:17: runtime error: member access within null pointer of type 'const struct Pair'
core/object.h:449:74: runtime error: member access within null pointer of type 'const struct Target'
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] godots() [0x140a2b0] (/mnt/KubuntuWolne/godot/platform/x11/crash_handler_x11.cpp:54)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x43f60) [0x7f1616784f60] (??:0)
[3] Object::Signal::Target::operator<(Object::Signal::Target const&) const (/mnt/KubuntuWolne/godot/core/object.h:449)
[4] VMap<Object::Signal::Target, Object::Signal::Slot>::_find(Object::Signal::Target const&, bool&) const (/mnt/KubuntuWolne/godot/./core/vmap.h:86)
[5] VMap<Object::Signal::Target, Object::Signal::Slot>::insert(Object::Signal::Target const&, Object::Signal::Slot const&) (/mnt/KubuntuWolne/godot/./core/vmap.h:120)
[6] VMap<Object::Signal::Target, Object::Signal::Slot>::operator[](Object::Signal::Target const&) (/mnt/KubuntuWolne/godot/./core/vmap.h:200)
[7] Object::connect(StringName const&, Object*, StringName const&, Vector<Variant> const&, unsigned int) (/mnt/KubuntuWolne/godot/core/object.cpp:1483)
[8] CurveTexture::set_curve(Ref<Curve>) (/mnt/KubuntuWolne/godot/scene/resources/texture.cpp:1731 (discriminator 4))
[9] MethodBind1<Ref<Curve> >::call(Object*, Variant const**, int, Variant::CallError&) (/mnt/KubuntuWolne/godot/./core/method_bind.gen.inc:775 (discriminator 12))
[10] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/mnt/KubuntuWolne/godot/core/object.cpp:921 (discriminator 1))
[11] Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) (/mnt/KubuntuWolne/godot/core/variant_call.cpp:1096 (discriminator 1))
[12] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) (/mnt/KubuntuWolne/godot/modules/gdscript/gdscript_function.cpp:1085)
[13] GDScriptInstance::call_multilevel(StringName const&, Variant const**, int) (/mnt/KubuntuWolne/godot/modules/gdscript/gdscript.cpp:1180)
[14] Node::_notification(int) (/mnt/KubuntuWolne/godot/scene/main/node.cpp:58)
[15] Node::_notificationv(int, bool) (/mnt/KubuntuWolne/godot/./scene/main/node.h:46 (discriminator 14))
[16] CanvasItem::_notificationv(int, bool) (/mnt/KubuntuWolne/godot/./scene/2d/canvas_item.h:166 (discriminator 3))
[17] Node2D::_notificationv(int, bool) (/mnt/KubuntuWolne/godot/./scene/2d/node_2d.h:38 (discriminator 3))
[18] Object::notification(int, bool) (/mnt/KubuntuWolne/godot/core/object.cpp:933)
[19] SceneTree::_notify_group_pause(StringName const&, int) (/mnt/KubuntuWolne/godot/scene/main/scene_tree.cpp:963)
[20] SceneTree::idle(float) (/mnt/KubuntuWolne/godot/scene/main/scene_tree.cpp:515 (discriminator 3))
[21] Main::iteration() (/mnt/KubuntuWolne/godot/main/main.cpp:1976)
[22] OS_X11::run() (/mnt/KubuntuWolne/godot/platform/x11/os_x11.cpp:3192)
[23] godots(main+0x342) [0x1401ba4] (/mnt/KubuntuWolne/godot/platform/x11/godot_x11.cpp:57)
[24] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f1616767b6b] (??:0)
[25] godots(_start+0x2a) [0x14017aa] (??:?)
```

**Steps to reproduce:**
Read project manual - https://github.com/qarmin/The-worst-Godot-test-project#the-worst-godot-test-project
Run project
**Minimal reproduction project:**
[The-worst-Godot-test-project.zip](https://github.com/qarmin/The-worst-Godot-test-project/archive/8f27b1de0293fd91169eb5e39a3cd032882ce0d2.zip)