[gnumeric] Fix crash in cell_calc_span. [#624274]
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix crash in cell_calc_span. [#624274]
- Date: Tue, 13 Jul 2010 19:39:12 +0000 (UTC)
commit 3c84c09ca75b2af2cfe9a7b8570ee218da7e9ba5
Author: Jean Brefort <jean brefort normalesup org>
Date: Tue Jul 13 21:39:42 2010 +0200
Fix crash in cell_calc_span. [#624274]
ChangeLog | 4 ++++
NEWS | 1 +
src/cellspan.c | 3 ++-
3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0bc5f78..700293f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2010-07-13 Jean Brefort <jean brefort normalesup org>
+ * src/cellspan.c (cell_calc_span): fixed crash introduced earlier. [#624274]
+
+2010-07-13 Jean Brefort <jean brefort normalesup org>
+
* src/graph.c (gnm_go_data_vector_load_len): fixed a regression. [#624263]
2010-07-13 Jean Brefort <jean brefort normalesup org>
diff --git a/NEWS b/NEWS
index 8049757..9313104 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,7 @@ Jean:
* Fix strong/weak cursor display. [#623241]
* Fix regression in ms_excel_chart_read. [#623960]
* Fix a regression in chart series evaluation. [#624263]
+ * Fix crash in cell_calc_span. [#624274]
* Install a self-consistent headers list.
Morten:
diff --git a/src/cellspan.c b/src/cellspan.c
index 611af76..256ea5f 100644
--- a/src/cellspan.c
+++ b/src/cellspan.c
@@ -235,7 +235,8 @@ cell_calc_span (GnmCell const *cell, int *col1, int *col2)
indented_w = cell_width_pixel = gnm_cell_rendered_width (cell);
if (h_align == HALIGN_LEFT || h_align == HALIGN_RIGHT) {
GnmRenderedValue *rv = gnm_cell_get_rendered_value (cell);
- PangoDirection dir = pango_find_base_dir (pango_layout_get_text (rv->layout), -1);
+ char const *text = pango_layout_get_text (rv->layout);
+ PangoDirection dir = (text && *text)? pango_find_base_dir (text, -1): PANGO_DIRECTION_LTR;
if (gnm_style_get_align_h (style) == HALIGN_GENERAL && dir == PANGO_DIRECTION_RTL)
h_align = HALIGN_RIGHT;
indented_w += gnm_cell_rendered_offset (cell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]