From c07901e29ed545bbb02e3bddf148fe1104b94e9f Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:56 -0500 Subject: Second Life viewer sources 1.15.1.3 --- linden/indra/newview/llpanelgroupgeneral.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'linden/indra/newview/llpanelgroupgeneral.cpp') diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp index 67a0c31..5ec9651 100644 --- a/linden/indra/newview/llpanelgroupgeneral.cpp +++ b/linden/indra/newview/llpanelgroupgeneral.cpp @@ -45,10 +45,10 @@ #include "llnamebox.h" #include "llnamelistctrl.h" #include "llspinctrl.h" +#include "llstatusbar.h" // can_afford_transaction() #include "lltextbox.h" #include "lltexteditor.h" #include "lltexturectrl.h" -#include "llviewermessage.h" #include "llviewerwindow.h" // static @@ -322,19 +322,27 @@ void LLPanelGroupGeneral::onClickJoin(void *userdata) LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(self->mGroupID); - S32 cost = gdatap->mMembershipFee; - LLString::format_map_t args; - args["[COST]"] = llformat("%d", cost); - - if (can_afford_transaction(cost)) + if (gdatap) { - gViewerWindow->alertXml("JoinGroupCanAfford", args, - LLPanelGroupGeneral::joinDlgCB, - self); + S32 cost = gdatap->mMembershipFee; + LLString::format_map_t args; + args["[COST]"] = llformat("%d", cost); + + if (can_afford_transaction(cost)) + { + gViewerWindow->alertXml("JoinGroupCanAfford", args, + LLPanelGroupGeneral::joinDlgCB, + self); + } + else + { + gViewerWindow->alertXml("JoinGroupCannotAfford", args); + } } else { - gViewerWindow->alertXml("JoinGroupCannotAfford", args); + llwarns << "gGroupMgr->getGroupData(" << self->mGroupID + << ") was NULL" << llendl; } } -- cgit v1.1