**System Information**
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71
**Blender Version**
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2022-01-26 21:12, hash: `rB0e86c60c28b6`
Worked: (newest version of Blender that worked as expected)
**Short description of error**
Crash when making a node group with a frame node and unselected nodes inside the frame.
**Exact steps for others to reproduce the error**
1. Make a simple node tree with one node (does not have to be functional or connected to the output)
1. Wrap the node in a frame (ctrl+J)
1. Select **only** the frame node, the inside node should be unselected.{F12839268}
1. Make a node group (ctrl+G)
The crash seems to happen if there are //any// unselected nodes within the frame:
* If there are multiple nodes in the frame it crashes if one of them is not selected.
* If all nodes inside the frame are selected it works as expected.
* If the frame is empty it works as expected.
{F12839267}