From fb4880272d0b5468d70a3518f48d851742777076 Mon Sep 17 00:00:00 2001 From: Emmanuel Rodriguez Date: Fri, 15 May 2009 17:28:19 +0200 Subject: [PATCH] Bug fix: get_modified_time_string() fails if the time is not set Updated the documentation for set_uri() and set_filename(). --- champlain/champlain-tile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/champlain/champlain-tile.c b/champlain/champlain-tile.c index e91e134..dd83614 100644 --- a/champlain/champlain-tile.c +++ b/champlain/champlain-tile.c @@ -372,6 +372,7 @@ champlain_tile_init (ChamplainTile *self) priv->size = 0; priv->uri = g_strdup (""); priv->filename = g_strdup (""); + priv->modified_time = NULL; priv->etag = NULL; priv->actor = g_object_ref (clutter_group_new ()); @@ -762,6 +763,9 @@ champlain_tile_get_modified_time_string (ChamplainTile *self) g_return_val_if_fail(CHAMPLAIN_TILE(self), NULL); ChamplainTilePrivate *priv = GET_PRIVATE (self); + if (priv->modified_time == NULL) + return NULL; + struct tm *other_time = gmtime (&priv->modified_time->tv_sec); char value [100]; -- 2.39.5