Fix segfault when replacing an existing component in a library.
Fix segfault when replacing an existing component in a library.

hellamps/kicad,hellamps/kicad,hellamps/kicad,hellamps/kicad,hellamps/kicad