From d17f433bf1c709b4daab58f503a142dd5e19cc4a Mon Sep 17 00:00:00 2001 From: James Moger Date: Tue, 13 Dec 2011 16:52:19 -0500 Subject: [PATCH] Fixed null pointer possibility for gravatar profiles --- src/com/gitblit/wicket/pages/GravatarProfilePage.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/gitblit/wicket/pages/GravatarProfilePage.java b/src/com/gitblit/wicket/pages/GravatarProfilePage.java index 1d702a7e..0fa90095 100644 --- a/src/com/gitblit/wicket/pages/GravatarProfilePage.java +++ b/src/com/gitblit/wicket/pages/GravatarProfilePage.java @@ -51,7 +51,10 @@ public class GravatarProfilePage extends RootPage { } catch (IOException e) { error(MessageFormat.format("Failed to find Gravatar profile for {0}", object), e, true); } - + + if (profile == null) { + error(MessageFormat.format("Failed to find Gravatar profile for {0}", object), true); + } add(new Label("displayName", profile.displayName)); add(new Label("username", profile.preferredUsername)); add(new Label("location", profile.currentLocation)); -- 2.39.5