fix segfault in error_dialog