Update mapstitch.cpp

When target distance is small, H (transformation matrix) sometimes is empty. When this happends, the program returns a "Core dumped" error and fails without control.