diff options
author | thickbrick | 2011-01-16 02:03:16 +0200 |
---|---|---|
committer | thickbrick | 2011-01-16 02:03:16 +0200 |
commit | 77883aef4bb8531c83bdeac45a5463a76e1158d7 (patch) | |
tree | 16a410a4dd08ea25ed99cd332a65403cf658a8a6 /linden/indra | |
parent | Fix offset reading from local files (diff) | |
download | meta-impy-77883aef4bb8531c83bdeac45a5463a76e1158d7.zip meta-impy-77883aef4bb8531c83bdeac45a5463a76e1158d7.tar.gz meta-impy-77883aef4bb8531c83bdeac45a5463a76e1158d7.tar.bz2 meta-impy-77883aef4bb8531c83bdeac45a5463a76e1158d7.tar.xz |
Fix #756: Link button in build floater can crash
Prevent null dereference when the selection has no primary object,
e.g. rubber band selection.
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/llfloatertools.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 683ebd4..cc205ee 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -1256,7 +1256,8 @@ void LLFloaterTools::onClickLink(void* data) | |||
1256 | } | 1256 | } |
1257 | 1257 | ||
1258 | S32 max_linked_prims = 0; | 1258 | S32 max_linked_prims = 0; |
1259 | if(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()->usePhysics()) | 1259 | LLViewerObject* first_rootp = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); |
1260 | if(first_rootp && first_rootp->usePhysics()) | ||
1260 | { | 1261 | { |
1261 | //Physical - use phys prim limit | 1262 | //Physical - use phys prim limit |
1262 | max_linked_prims = gHippoLimits->getMaxPhysLinkedPrims(); | 1263 | max_linked_prims = gHippoLimits->getMaxPhysLinkedPrims(); |