[gnumeric] GUI: Fix crash with split panes.



commit a69c57d6ff4fbe58178edc125f4736aa1c796c3e
Author: Morten Welinder <terra gnome org>
Date:   Thu Aug 29 10:26:52 2013 -0400

    GUI: Fix crash with split panes.

 ChangeLog               |    5 +++++
 NEWS                    |    1 +
 src/sheet-control-gui.c |    3 ++-
 3 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9b2ddcc..8f3d8d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-29  Morten Welinder  <terra gnome org>
+
+       * src/sheet-control-gui.c (scg_find_pane): Check for NULL pane.
+       Fixes #707047.
+
 2013-08-28  Morten Welinder  <terra gnome org>
 
        * src/mathfunc.c (gnm_gamma): Improve precision for large
diff --git a/NEWS b/NEWS
index 17e12be..6128c6c 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Gnumeric 1.12.7
 
 Morten:
        * Extend BESSELJ and BESSELY to handle fractional order.  [#706720]
+       * Fix crash with split pane.  [#707047]
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.6
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index 5ae5328..542976b 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -3702,7 +3702,8 @@ scg_find_pane (SheetControlGUI *scg, GnmCellPos *pos)
        for (i = 0; i < scg->active_panes; i++) {
                GnmPane *pane = scg->pane[i];
 
-               if (pane->first.col <= pos->col &&
+               if (pane &&
+                   pane->first.col <= pos->col &&
                    pane->first.row <= pos->row &&
                    pane->last_visible.col >= pos->col &&
                    pane->last_visible.row >= pos->row)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]