Qt UI: Fix aspell resource leak.

Freeing resources correctly in case of error.
(Problem is found using Valgrind)