--- prog/aspell.cpp.orig 2008-07-09 19:51:37 +0700 +++ prog/aspell.cpp 2008-07-10 14:31:18 +0700 @@ -1005,6 +1005,7 @@ void check() mapping.to_ispell(); else { print_error(_("Invalid keymapping: %s"), m); + remove_file(new_name); exit(-1); } @@ -1012,6 +1013,7 @@ void check() = new_aspell_speller(reinterpret_cast(options.get())); if (aspell_error(ret)) { print_error(aspell_error_message(ret)); + remove_file(new_name); exit(1); } --- prog/checker_string.cpp.orig 2008-07-10 12:47:35 +0700 +++ prog/checker_string.cpp 2008-07-10 14:23:50 +0700 @@ -56,7 +56,9 @@ CheckerString::CheckerString(AspellSpell has_repl_ = false; checker_.reset(new_document_checker(reinterpret_cast(speller))); - checker_->process(cur_line_->real.data(), cur_line_->real.size()); + if (cur_line_->real.size()) { + checker_->process(cur_line_->real.data(), cur_line_->real.size()); + } } CheckerString::~CheckerString()