]> source.dussan.org Git - gitblit.git/commitdiff
Fixed null pointer possibility for gravatar profiles
authorJames Moger <james.moger@gitblit.com>
Tue, 13 Dec 2011 21:52:19 +0000 (16:52 -0500)
committerJames Moger <james.moger@gitblit.com>
Tue, 13 Dec 2011 21:52:19 +0000 (16:52 -0500)
src/com/gitblit/wicket/pages/GravatarProfilePage.java

index 1d702a7e04f58b2dd9265491e47d44d8253920b5..0fa90095244a78c32b0afe1f0f50e2c8d26592bc 100644 (file)
@@ -51,7 +51,10 @@ public class GravatarProfilePage extends RootPage {
                } catch (IOException e) {\r
                        error(MessageFormat.format("Failed to find Gravatar profile for {0}", object), e, true);\r
                }\r
-\r
+               \r
+               if (profile == null) {\r
+                       error(MessageFormat.format("Failed to find Gravatar profile for {0}", object), true);\r
+               }\r
                add(new Label("displayName", profile.displayName));\r
                add(new Label("username", profile.preferredUsername));\r
                add(new Label("location", profile.currentLocation));\r