In 113d91aba8 the mesh joining operator is
largely rewritten but the `join_positions_and_shape_keys` part didn't
supply valid `bmain` and `id` for `BKE_key_add` which leads to crash.
Now fixed by supplying correct arguments.
Pull Request: https://projects.blender.org/blender/blender/pulls/147101