[gthumb: 10/15] check if caption_layout is null before using it
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 10/15] check if caption_layout is null before using it
- Date: Wed, 23 Nov 2011 12:50:41 +0000 (UTC)
commit c4e7c82c28ce7e27a75f6751fe86727b8ff91c42
Author: Paolo Bacchilega <paobac src gnome org>
Date: Tue Nov 22 23:59:11 2011 +0100
check if caption_layout is null before using it
gthumb/gth-grid-view.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/gth-grid-view.c b/gthumb/gth-grid-view.c
index a523fb7..d26ca30 100644
--- a/gthumb/gth-grid-view.c
+++ b/gthumb/gth-grid-view.c
@@ -649,7 +649,7 @@ _gth_grid_view_update_item_size (GthGridView *self,
item->area.width = self->priv->cell_size;
item->area.height = self->priv->cell_padding + thumbnail_size;
- if (self->priv->update_caption_height || item->update_caption_height) {
+ if ((self->priv->caption_layout != NULL) && (self->priv->update_caption_height || item->update_caption_height)) {
if ((item->caption != NULL) && (g_strcmp0 (item->caption, "") != 0)) {
pango_layout_set_markup (self->priv->caption_layout, item->caption, -1);
pango_layout_get_pixel_size (self->priv->caption_layout, NULL, &item->caption_area.height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]