From: Emmanuel Rodriguez Date: Fri, 15 May 2009 15:28:19 +0000 (+0200) Subject: Bug fix: get_modified_time_string() fails if the time is not set X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb4880272d0b5468d70a3518f48d851742777076;p=libchamplain Bug fix: get_modified_time_string() fails if the time is not set Updated the documentation for set_uri() and set_filename(). --- 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];