diff -up widelands-build16-src/src/ui_basic/window.cc~ widelands-build16-src/src/ui_basic/window.cc
--- widelands-build16-src/src/ui_basic/window.cc~ 2011-04-15 20:40:26.000000000 +0200
+++ widelands-build16-src/src/ui_basic/window.cc 2011-07-16 15:35:18.976363248 +0200
@@ -250,12 +250,15 @@ void Window::move_inside_parent() {
*/
void Window::center_to_parent()
{
- Panel & parent = *get_parent();
+ Panel *parent = get_parent();
+
+ if (!parent)
+ return;
set_pos
(Point
- ((parent.get_inner_w() - get_w()) / 2,
- (parent.get_inner_h() - get_h()) / 2));
+ ((parent->get_inner_w() - get_w()) / 2,
+ (parent->get_inner_h() - get_h()) / 2));
}