footprint editor segfault on copy multi item (lp:#1832331)

[Original report](https://bugs.launchpad.net/bugs/1832331) created by **Martin Thomas (mtlaunchpad)**
```
- I select 3 lines by pressing shift and select it with the mouse
- I pressed Strg C
- I pressed Strg V

=> kicad crashed


Application: KiCad
Version: (5.1.0-892-gd81f4c837), debug build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.52.1 GnuTLS/3.5.8 zlib/1.2.8 libidn2/0.16 libpsl/0.17.0
(+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
Platform: Linux 5.1.3-mt x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.62.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.52.1
    Compiler: GCC 6.3.0 with C++ ABI 1010

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=OFF


[New Thread 0x7fffd1182700 (LWP 985)]
[Thread 0x7fffe2601700 (LWP 983) exited]
[New Thread 0x7fffe2601700 (LWP 986)]
[Thread 0x7fffd1182700 (LWP 985) exited]
[Thread 0x7fffe2601700 (LWP 986) exited]
[New Thread 0x7fffe2601700 (LWP 987)]
[Thread 0x7fffe2601700 (LWP 987) exited]
/home/mthomas/daten/git/kicad/kicad-source-
mirror/pcbnew/class_module.cpp(293): assert "Assert failure" failed in
Remove(): MODULE::Remove() needs work: BOARD_ITEM type (1561502560) not
handled
/home/mthomas/daten/git/kicad/kicad-source-
mirror/pcbnew/class_module.cpp(293): assert "Assert failure" failed in
Remove(): MODULE::Remove() needs work: BOARD_ITEM type (1563120624) not
handled

Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
0x00007fffda90ae84 in EDA_ITEM::Type (this=0x0) at
/home/mthomas/daten/git/kicad/kicad-source-mirror/include/base_struct.h:199
199             return m_StructType;
(gdb) backtrace
#0  0x00007fffda90ae84 in EDA_ITEM::Type (this=0x0) at
/home/mthomas/daten/git/kicad/kicad-source-mirror/include/base_struct.h:199
#1  0x00007fffdb026275 in MODULE::Remove (this=0x5555597bd120,
aBoardItem=0x0)
    at /home/mthomas/daten/git/kicad/kicad-source-
mirror/pcbnew/class_module.cpp:270
#2  0x00007fffdac5674b in PCBNEW_CONTROL::Paste (this=0x555559806c60,
aEvent=...)
    at /home/mthomas/daten/git/kicad/kicad-source-
mirror/pcbnew/tools/pcbnew_control.cpp:725
#3  0x00007fffdac5ff30 in std::__invoke_impl<int, int (PCBNEW_CONTROL::*
const&)(TOOL_EVENT const&), PCBNEW_CONTROL*&, TOOL_EVENT const&> (__f=
   @ 0x55555d1123c0: (int (PCBNEW_CONTROL::*)(PCBNEW_CONTROL * const, const
TOOL_EVENT &)) 0x7fffdac561f2 <PCBNEW_CONTROL::Paste(TOOL_EVENT const&)>,
__t=@0x55555d1123d0: 0x555559806c60, __args#0=...) at
/usr/include/c++/6/functional:227
#4  0x00007fffdac5fd46 in std::__invoke<int (PCBNEW_CONTROL::*
const&)(TOOL_EVENT const&), PCBNEW_CONTROL*&, TOOL_EVENT const&> (
    __fn=
   @ 0x55555d1123c0: (int (PCBNEW_CONTROL::*)(PCBNEW_CONTROL * const, const
TOOL_EVENT &)) 0x7fffdac561f2 <PCBNEW_CONTROL::Paste(TOOL_EVENT const&)>,
__args#0=@0x55555d1123d0: 0x555559806c60, __args#1=...) at
/usr/include/c++/6/functional:251
#5  0x00007fffdac5fc2f in std::_Mem_fn_base<int
(PCBNEW_CONTROL::*)(TOOL_EVENT const&), true>::operator()<PCBNEW_CONTROL*&,
TOOL_EVENT const&> (this=0x55555d1123c0, __args#0=@0x55555d1123d0:
0x555559806c60, __args#1=...) at /usr/include/c++/6/functional:604
#6  0x00007fffdac5fb15 in std::_Bind<std::_Mem_fn<int
(PCBNEW_CONTROL::*)(TOOL_EVENT const&)> (PCBNEW_CONTROL*,
std::_Placeholder<1>)>::__call<int, TOOL_EVENT const&, 0ul,
1ul>(std::tuple<TOOL_EVENT const&>&&, std::_Index_tuple<0ul, 1ul>)
(this=0x55555d1123c0,
    __args=<unknown type in /usr/local/bin/_pcbnew.kiface, CU 0x36069c7,
DIE 0x3674484>) at /usr/include/c++/6/functional:934
#7  0x00007fffdac5f8bd in std::_Bind<std::_Mem_fn<int
(PCBNEW_CONTROL::*)(TOOL_EVENT const&)> (PCBNEW_CONTROL*,
std::_Placeholder<1>)>::operator()<TOOL_EVENT const&, int>(TOOL_EVENT
const&) (this=0x55555d1123c0, __args#0=...) at
/usr/include/c++/6/functional:993
#8  0x00007fffdac5f18a in std::_Function_handler<int (TOOL_EVENT const&),
std::_Bind<std::_Mem_fn<int (PCBNEW_CONTROL::*)(TOOL_EVENT const&)>
(PCBNEW_CONTROL*, std::_Placeholder<1>)> >::_M_invoke(std::_Any_data
const&, TOOL_EVENT const&) (__functor=..., __args#0=...)
    at /usr/include/c++/6/functional:1717
#9  0x00007fffdb2dd559 in std::function<int (TOOL_EVENT
const&)>::operator()(TOOL_EVENT const&) const (this=0x55555776c1b8,
    __args#0=...) at /usr/include/c++/6/functional:2127
#10 0x00007fffdb2da68b in COROUTINE<int, TOOL_EVENT const&>::callerStub
(aData=140737488338992)
    at /home/mthomas/daten/git/kicad/kicad-source-
mirror/include/tool/coroutine.h:331
#11 0x00007fffdb3378e1 in make_fcontext () from
/usr/local/bin/_pcbnew.kiface
#12 0x0000000000000000 in ?? ()
```
Original tags: pcbnew

Story points: 6.0