Comment 3 for bug 1794339

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Problem is here:

> UI::WLMessageBox mmb(d->modal, _("Disconnected from Host"), msg, UI::WLMessageBox::MBoxType::kOk);

But this Messagebox has no parent, this makes this code fail:

void Window::center_to_parent() {
 Panel& parent = *get_parent();

 set_pos(Vector2i((static_cast<int32_t>(parent.get_inner_w()) - get_w()) / 2,
                  (static_cast<int32_t>(parent.get_inner_h()) - get_h()) / 2));
}

Since when do we do this?