[gnumeric] mps: handle no-rows case.



commit d15e91b49b10734469e0f6324fb1eba6d37ffef3
Author: Morten Welinder <terra gnome org>
Date:   Mon Jun 22 14:50:18 2015 -0400

    mps: handle no-rows case.

 plugins/mps/ChangeLog |    4 ++++
 plugins/mps/mps.c     |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/mps/ChangeLog b/plugins/mps/ChangeLog
index e73b3e6..c86e6a5 100644
--- a/plugins/mps/ChangeLog
+++ b/plugins/mps/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-22  Morten Welinder  <terra gnome org>
+
+       * mps.c (mps_fill_sheet): Handle no-rows case.
+
 2015-04-16  Morten Welinder <terra gnome org>
 
        * Release 1.12.22
diff --git a/plugins/mps/mps.c b/plugins/mps/mps.c
index 9a9d499..be35628 100644
--- a/plugins/mps/mps.c
+++ b/plugins/mps/mps.c
@@ -666,7 +666,7 @@ mps_fill_sheet (MpsState *state)
 
        /* ---------------------------------------- */
 
-       {
+       if (state->rows->len > 0) {
                int x = OBJ_BASE_COL;
                int y = OBJ_BASE_ROW;
                MpsRow *row = g_ptr_array_index (state->rows, 0);


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