Repository: godot
Issue: Editor crashes when trying to edit a dock-made signal connection to a deleted node
Labels: bug,topic:editor,crash

### Tested versions

NOT Reproducible in:
- v4.0.stable.official [92bee43ad]
- v4.2.stable.official [46dc27791]
- v4.2.2.stable.official [15073afe3]
- v4.3.dev2.official [352434668]
- v4.3.dev3.official [36e943b6b]

Reproducible in:
- v4.3.dev4.official [df78c0636]
- v4.3.beta1.official [a4f2ea91a]
- v4.3.stable.official [77dcf97d8]
- v4.4.beta1.official [d33da79d3]

### System information

Windows 11 - Godot v4.3.stable - Vulkan (Forward+)

### Issue description

When deleting a Node from the scene tree, the Editor does not delete connections made to that Node that were made in the Node Signal Dock.

After trying to edit such a "null" connection in the Node Signal Dock, the Editor crashes.

I would expect it not to crash, but instead delete any GUI-made connections to a Node that is being deleted from the Scene.


Upon clicking "Edit..." on a "null" connection, the following is the console output from Godot:

```
<...>
ERROR: Cannot get path of node as it is not in a scene tree.
   at: (scene/main/node.cpp:2257)
ERROR: Parameter "common_parent" is null.
   at: get_path_to (scene/main/node.cpp:2192)
ERROR: Node not found: "" (relative to "/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSp.
   at: (scene/main/node.cpp:1792)

================================================================
CrashHandlerException: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] error(-1): no debug info in PE/COFF executable
[2] error(-1): no debug info in PE/COFF executable
[3] error(-1): no debug info in PE/COFF executable
[4] error(-1): no debug info in PE/COFF executable
[5] error(-1): no debug info in PE/COFF executable
[6] error(-1): no debug info in PE/COFF executable
[7] error(-1): no debug info in PE/COFF executable
[8] error(-1): no debug info in PE/COFF executable
[9] error(-1): no debug info in PE/COFF executable
[10] error(-1): no debug info in PE/COFF executable
[11] error(-1): no debug info in PE/COFF executable
[12] error(-1): no debug info in PE/COFF executable
[13] error(-1): no debug info in PE/COFF executable
[14] error(-1): no debug info in PE/COFF executable
[15] error(-1): no debug info in PE/COFF executable
[16] error(-1): no debug info in PE/COFF executable
[17] error(-1): no debug info in PE/COFF executable
[18] error(-1): no debug info in PE/COFF executable
[19] error(-1): no debug info in PE/COFF executable
[20] error(-1): no debug info in PE/COFF executable
[21] error(-1): no debug info in PE/COFF executable
[22] error(-1): no debug info in PE/COFF executable
[23] error(-1): no debug info in PE/COFF executable
[24] error(-1): no debug info in PE/COFF executable
[25] error(-1): no debug info in PE/COFF executable
[26] error(-1): no debug info in PE/COFF executable
[27] error(-1): no debug info in PE/COFF executable
[28] error(-1): no debug info in PE/COFF executable
-- END OF BACKTRACE --
================================================================
```

### Steps to reproduce

1. Create a new Project
2. Create a scene with a root Node called `NodeX`
3. Attach a new script to `NodeX`, define a signal `my_signal` in it
4. Create a child of `NodeX`, a Node called `NodeY`
5. Attach a new script to `NodeY`
6. Select `NodeX` in the Scene Dock
7 .Open the Node Dock > Signals
8. Connect the signal from `NodeX` to `NodeY`

> note: the saved project file is in this state

9. Delete `NodeY` in the Scene Dock
10. Select `NodeX` in the Scene Dock
11. Open the Node Dock > Signals
12. Under `my_signal()`, right-click the "connection", and select "Edit..."
13. A new empty window opens
14. Godot Editor crashes

### Minimal reproduction project (MRP)

[project.zip](https://github.com/user-attachments/files/18482710/project.zip)

Made in v4.3.dev4.official