Fixed segfault when trying to paste partially copied (and thus erroneous) patch from an external source (e.g. a text editor) where the copied contents contain only "connect" instructions.