From e63a51ed1645f12f8f6e73c8b3bc7956f357962d Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Sun, 29 Dec 2013 16:52:54 -0500 Subject: [PATCH] Only modify this if it's defined. --- conky-mythtv-weather-build.plx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conky-mythtv-weather-build.plx b/conky-mythtv-weather-build.plx index b06347b..85521ee 100755 --- a/conky-mythtv-weather-build.plx +++ b/conky-mythtv-weather-build.plx @@ -97,7 +97,8 @@ if (not defined $data{extended}{updatetime}) { } } -$data{forecast}{updatetime} =~ s/\s*Last\s+Updated\s+(?:on|:)?\s*//; +$data{forecast}{updatetime} =~ s/\s*Last\s+Updated\s+(?:on|:)?\s*// + if defined $data{forecast}{updatetime}; my $now = ParseDate("now"); my $updateTime = ParseDate($data{forecast}{updatetime}); my $x = Delta_Format(DateCalc($updateTime, $now), 0, "%mt minutes ago");