diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index 1e15dc832cd91f8a62c008baa4956252845715f9..88e7ad1b71b7f99ef77c64dc48946b978b1e3cc0 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -215,7 +215,9 @@ void LLInspectAvatar::onOpen(const LLSD& data)
 	}
 
 	// Generate link to avatar profile.
-	getChild<LLUICtrl>("avatar_profile_link")->setTextArg("[LINK]", LLSLURL("agent", mAvatarID, "about").getSLURLString());
+	LLTextBase* avatar_profile_link = getChild<LLTextBase>("avatar_profile_link");
+	avatar_profile_link->setTextArg("[LINK]", LLSLURL("agent", mAvatarID, "about").getSLURLString());
+	avatar_profile_link->setIsFriendCallback(LLAvatarActions::isFriend);
 
 	// can't call from constructor as widgets are not built yet
 	requestUpdate();