Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37726281
en ru br
ALT Linux repos
S:1.1-alt2.20230624
5.0: b12-alt1
4.1: b12-alt1

Group :: Games/Strategy
RPM: widelands

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: widelands-build17-src-crash-on-messagebox.patch
Download


diff -up widelands-build17-src/src/ui_basic/window.cc.crash-on-messagebox widelands-build17-src/src/ui_basic/window.cc
--- widelands-build17-src/src/ui_basic/window.cc.crash-on-messagebox	2012-04-23 11:46:49.000000000 +0200
+++ widelands-build17-src/src/ui_basic/window.cc	2012-06-25 14:00:05.677491646 +0200
@@ -252,12 +252,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
-		((static_cast<int32_t>(parent.get_inner_w()) - get_w()) / 2,
-		 (static_cast<int32_t>(parent.get_inner_h()) - get_h()) / 2));
+		((static_cast<int32_t>(parent->get_inner_w()) - get_w()) / 2,
+		 (static_cast<int32_t>(parent->get_inner_h()) - get_h()) / 2));
 }
 
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin