Main window: In case of scan error, fix the display of the error message

Signed-off-by: Jerome Flesch <jflesch@gmail.com>