Fixed problem where importing invalid midi files caused crash.