[gnumeric] Don't crash on NULL rv
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Don't crash on NULL rv
- Date: Tue, 13 Jul 2010 19:46:46 +0000 (UTC)
commit cd44a63b1b6288960530d3c59839b9f5df5c5e0a
Author: Jean Brefort <jean brefort normalesup org>
Date: Tue Jul 13 21:47:11 2010 +0200
Don't crash on NULL rv
src/cellspan.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/cellspan.c b/src/cellspan.c
index 256ea5f..22f054f 100644
--- a/src/cellspan.c
+++ b/src/cellspan.c
@@ -235,7 +235,7 @@ 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);
- char const *text = pango_layout_get_text (rv->layout);
+ char const *text = (rv)? pango_layout_get_text (rv->layout): NULL;
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]