[maemo-commits] [maemo-commits] r18608 - in projects/haf/trunk/libmatchbox2: . debian matchbox/core

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Jun 4 16:45:44 EEST 2009
Author: kihamala
Date: 2009-06-04 16:45:41 +0300 (Thu, 04 Jun 2009)
New Revision: 18608

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/debian/changelog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-decor.c
Log:
patch from Laszlo for NB#117853


Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-06-04 10:18:36 UTC (rev 18607)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-06-04 13:45:41 UTC (rev 18608)
@@ -1,5 +1,10 @@
 2009-06-04  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
 
+	Patch from Laszlo Pere fox NB#117853.
+
+	* matchbox/core/mb-wm-decor.c (mb_wm_decor_button_destroy): Add NULL
+	check to avoid possible crash.
+
 	Revert Thomas' fix for NB#114352, since there should be already 1024
 	byte limit (better fix that if it's broken), needs more investigation.
 

Modified: projects/haf/trunk/libmatchbox2/debian/changelog
===================================================================
--- projects/haf/trunk/libmatchbox2/debian/changelog	2009-06-04 10:18:36 UTC (rev 18607)
+++ projects/haf/trunk/libmatchbox2/debian/changelog	2009-06-04 13:45:41 UTC (rev 18608)
@@ -4,6 +4,9 @@
   * Fixes to non-compositing mode support.
   * Update libclutter-dev build dependency because of new API there.
 
+  Laszlo:
+  * Fixes: NB#117853 - Unreproducible crash -mb_wm_decor_button_destroy ()
+
  -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Mon,  1 Jun 2009 08:29:17 +0300
 
 matchbox-window-manager-2 (0.2.41-1) unstable; urgency=low

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-decor.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-decor.c	2009-06-04 10:18:36 UTC (rev 18607)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-decor.c	2009-06-04 13:45:41 UTC (rev 18608)
@@ -1162,7 +1162,16 @@
 mb_wm_decor_button_destroy (MBWMObject* obj)
 {
   MBWMDecorButton * button = MB_WM_DECOR_BUTTON (obj);
-  MBWMMainContext * ctx = button->decor->parent_client->wmref->main_ctx;
+  MBWMMainContext * ctx = NULL;
+  
+  ctx = button &&
+	  button->decor &&
+	  button->decor->parent_client &&
+	  button->decor->parent_client->wmref ? 
+	  button->decor->parent_client->wmref->main_ctx : NULL;
+
+  if (!ctx)
+	  return;
   /*
    * We are doing the job in the mb_wm_decor_button_unrealize() while the
    * decoration still exists.


More information about the maemo-commits mailing list