Crash on reentering footprint viewer (lp:#1840088)

[Original report](https://bugs.launchpad.net/bugs/1840088) created by **Timothy Pearson (kb9vqf)**
```
Using KiCad 5.1.4 I can reliably cause a crash / SIGFPE by:

1.) Creating (or opening) a project with a single BGA part in the
schematic, with an assigned BGA footprint from the Pretty library (e.g.
BG121).

2.) Opening the footprint assignment tool

3.) Opening the footprint viewer

4.) Opening the 3D view from the footprint viewer

5.) Closing the 3D view and the footprint viewer

6.) Opening the footprint viewer again

Backtrace:

Thread 1 "kicad" received signal SIGFPE, Arithmetic exception.
__libc_femergeenv_ppc (new_mask=18446744073709031423,
old_mask=18446744073709551360, envp=<synthetic pointer>) at
../sysdeps/powerpc/fpu/fenv_private.h:120
120     ../sysdeps/powerpc/fpu/fenv_private.h: No such file or directory.
(gdb) bt
#0  __libc_femergeenv_ppc (new_mask=18446744073709031423,
old_mask=18446744073709551360, envp=<synthetic pointer>) at
../sysdeps/powerpc/fpu/fenv_private.h:120
#1  libc_feresetround_ppc (envp=<synthetic pointer>) at
../sysdeps/powerpc/fpu/fenv_private.h:135
#2  libc_feresetround_ppc_ctx (ctx=<synthetic pointer>) at
../sysdeps/powerpc/fpu/fenv_private.h:212
#3  __cos (x=<optimized out>) at ../sysdeps/ieee754/dbl-64/s_sin.c:276
#4  0x00007fffd19f6cbc in MATRIX3x3<double>::SetRotation (this=<optimized
out>, aAngle=0) at ./include/math/matrix3x3.h:251
#5  KIGFX::GAL::ComputeWorldScreenMatrix (this=<optimized out>) at
./common/gal/graphics_abstraction_layer.cpp:189
#6  0x00007fffd1962c0c in KIGFX::VIEW::SetScale (this=0x19b5c9f0,
aScale=<optimized out>, aAnchor=...) at ./common/view/view.cpp:590
#7  0x00007fffd1973394 in KIGFX::VIEW::SetScale (this=<optimized out>,
aScale=<optimized out>) at ./include/view/view.h:252
#8  COMMON_TOOLS::ZoomFitScreen (this=<optimized out>, aEvent=...) at
./common/tool/common_tools.cpp:258
#9  0x00007fffd197519c in std::__invoke_impl<int, int
(COMMON_TOOLS::*&)(TOOL_EVENT const&), COMMON_TOOLS*&, TOOL_EVENT const&>
(__f=<optimized out>, __t=<optimized out>,
    __args=...) at /usr/bin/../lib/gcc/powerpc64le-linux-
gnu/8/../../../../include/c++/8/bits/invoke.h:73
#10 std::__invoke<int (COMMON_TOOLS::*&)(TOOL_EVENT const&),
COMMON_TOOLS*&, TOOL_EVENT const&> (__fn=<optimized out>, __args=...,
__args=...)
    at /usr/bin/../lib/gcc/powerpc64le-linux-
gnu/8/../../../../include/c++/8/bits/invoke.h:95
#11 std::_Bind<int (COMMON_TOOLS::*(COMMON_TOOLS*,
std::_Placeholder<1>))(TOOL_EVENT const&)>::__call<int, TOOL_EVENT const&,
0ul, 1ul>(std::tuple<TOOL_EVENT const&>&&, std::_Index_tuple<0ul, 1ul>)
(this=<optimized out>, __args=...) at /usr/bin/../lib/gcc/powerpc64le-
linux-gnu/8/../../../../include/c++/8/functional:400
#12 std::_Bind<int (COMMON_TOOLS::*(COMMON_TOOLS*,
std::_Placeholder<1>))(TOOL_EVENT const&)>::operator()<TOOL_EVENT const&,
int>(TOOL_EVENT const&) (this=<optimized out>,
    __args=...) at /usr/bin/../lib/gcc/powerpc64le-linux-
gnu/8/../../../../include/c++/8/functional:482
#13 std::_Function_handler<int (TOOL_EVENT const&), std::_Bind<int
(COMMON_TOOLS::*(COMMON_TOOLS*, std::_Placeholder<1>))(TOOL_EVENT const&)>
>::_M_invoke(std::_Any_data const&, TOOL_EVENT const&) (__functor=...,
__args=...) at /usr/bin/../lib/gcc/powerpc64le-linux-
gnu/8/../../../../include/c++/8/bits/std_function.h:282
#14 0x00007fffd19866e4 in std::function<int (TOOL_EVENT
const&)>::operator()(TOOL_EVENT const&) const (this=<optimized out>,
__args=...)
    at /usr/bin/../lib/gcc/powerpc64le-linux-
gnu/8/../../../../include/c++/8/bits/std_function.h:687
#15 COROUTINE<int, TOOL_EVENT const&>::callerStub (aData=<optimized out>)
at ./include/tool/coroutine.h:331
#16 0x00007fffd19e1f70 in make_fcontext () from /usr/bin/_cvpcb.kiface
#17 0x00007fffd19866e4 in std::function<int (TOOL_EVENT
const&)>::operator()(TOOL_EVENT const&) const (this=<optimized out>,
__args=...)
    at /usr/bin/../lib/gcc/powerpc64le-linux-
gnu/8/../../../../include/c++/8/bits/std_function.h:687
#18 COROUTINE<int, TOOL_EVENT const&>::callerStub (aData=<optimized out>)
at ./include/tool/coroutine.h:331
#19 0x00007fffd19e1f70 in make_fcontext () from /usr/bin/_cvpcb.kiface
(gdb)
```

Story points: 6.0