aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelgroupgeneral.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpanelgroupgeneral.cpp')
-rw-r--r--linden/indra/newview/llpanelgroupgeneral.cpp28
1 files changed, 18 insertions, 10 deletions
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 @@
45#include "llnamebox.h" 45#include "llnamebox.h"
46#include "llnamelistctrl.h" 46#include "llnamelistctrl.h"
47#include "llspinctrl.h" 47#include "llspinctrl.h"
48#include "llstatusbar.h" // can_afford_transaction()
48#include "lltextbox.h" 49#include "lltextbox.h"
49#include "lltexteditor.h" 50#include "lltexteditor.h"
50#include "lltexturectrl.h" 51#include "lltexturectrl.h"
51#include "llviewermessage.h"
52#include "llviewerwindow.h" 52#include "llviewerwindow.h"
53 53
54// static 54// static
@@ -322,19 +322,27 @@ void LLPanelGroupGeneral::onClickJoin(void *userdata)
322 322
323 LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(self->mGroupID); 323 LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(self->mGroupID);
324 324
325 S32 cost = gdatap->mMembershipFee; 325 if (gdatap)
326 LLString::format_map_t args;
327 args["[COST]"] = llformat("%d", cost);
328
329 if (can_afford_transaction(cost))
330 { 326 {
331 gViewerWindow->alertXml("JoinGroupCanAfford", args, 327 S32 cost = gdatap->mMembershipFee;
332 LLPanelGroupGeneral::joinDlgCB, 328 LLString::format_map_t args;
333 self); 329 args["[COST]"] = llformat("%d", cost);
330
331 if (can_afford_transaction(cost))
332 {
333 gViewerWindow->alertXml("JoinGroupCanAfford", args,
334 LLPanelGroupGeneral::joinDlgCB,
335 self);
336 }
337 else
338 {
339 gViewerWindow->alertXml("JoinGroupCannotAfford", args);
340 }
334 } 341 }
335 else 342 else
336 { 343 {
337 gViewerWindow->alertXml("JoinGroupCannotAfford", args); 344 llwarns << "gGroupMgr->getGroupData(" << self->mGroupID
345 << ") was NULL" << llendl;
338 } 346 }
339} 347}
340 348