diff options
author | James Moger <james.moger@gitblit.com> | 2011-12-13 16:52:19 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-12-13 16:52:19 -0500 |
commit | d17f433bf1c709b4daab58f503a142dd5e19cc4a (patch) | |
tree | 1cdffb58fb61659fe9b42e5bd48e71eda3a610a9 | |
parent | 3b6904b1d92b987e308f5fb3308fec215ba1f1ae (diff) | |
download | gitblit-d17f433bf1c709b4daab58f503a142dd5e19cc4a.tar.gz gitblit-d17f433bf1c709b4daab58f503a142dd5e19cc4a.zip |
Fixed null pointer possibility for gravatar profiles
-rw-r--r-- | src/com/gitblit/wicket/pages/GravatarProfilePage.java | 5 |
1 files changed, 4 insertions, 1 deletions
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));
|