Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
6a812fa1
Commit
6a812fa1
authored
1 year ago
by
Brad Linden
Browse files
Options
Downloads
Patches
Plain Diff
Improved fix for SL-19675 crash. How about just don't refer to data when you don't need it
parent
3513f67d
No related branches found
No related tags found
2 merge requests
!3
Update to main branch
,
!2
Rebase onto current main branch
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llprimitive/llgltfmaterial.h
+1
-0
1 addition, 0 deletions
indra/llprimitive/llgltfmaterial.h
indra/newview/llgltfmateriallist.cpp
+9
-9
9 additions, 9 deletions
indra/newview/llgltfmateriallist.cpp
with
10 additions
and
9 deletions
indra/llprimitive/llgltfmaterial.h
+
1
−
0
View file @
6a812fa1
...
...
@@ -167,6 +167,7 @@ class LLGLTFMaterial : public LLRefCount
// set the contents of this LLGLTFMaterial from the given json
// returns true if successful
// if unsuccessful, the contents of this LLGLTFMaterial should be left unchanged and false is returned
// json - the json text to load from
// warn_msg - warning message from TinyGLTF if any
// error_msg - error_msg from TinyGLTF if any
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llgltfmateriallist.cpp
+
9
−
9
View file @
6a812fa1
...
...
@@ -227,16 +227,16 @@ class LLGLTFMaterialOverrideDispatchHandler : public LLDispatchHandler
// fromJson() is performance heavy offload to a thread.
main_queue
->
postTo
(
general_queue
,
[
object_override
]()
// Work done on general queue
[
sides
=
object_override
.
mSides
]()
// Work done on general queue
{
std
::
vector
<
ReturnData
>
results
;
if
(
!
object_override
.
mS
ides
.
empty
())
if
(
!
s
ides
.
empty
())
{
results
.
reserve
(
object_override
.
mS
ides
.
size
());
results
.
reserve
(
s
ides
.
size
());
// parse json
std
::
unordered_map
<
S32
,
std
::
string
>::
const_iterator
iter
=
object_override
.
mS
ides
.
begin
();
std
::
unordered_map
<
S32
,
std
::
string
>::
const_iterator
end
=
object_override
.
mS
ides
.
end
();
std
::
unordered_map
<
S32
,
std
::
string
>::
const_iterator
iter
=
s
ides
.
begin
();
std
::
unordered_map
<
S32
,
std
::
string
>::
const_iterator
end
=
s
ides
.
end
();
while
(
iter
!=
end
)
{
std
::
string
warn_msg
,
error_msg
;
...
...
@@ -259,9 +259,9 @@ class LLGLTFMaterialOverrideDispatchHandler : public LLDispatchHandler
}
return
results
;
},
[
object_
override
,
this
](
std
::
vector
<
ReturnData
>
results
)
// Callback to main thread
[
object_
id
=
object_override
.
mObjectId
,
this
](
std
::
vector
<
ReturnData
>
results
)
// Callback to main thread
{
LLViewerObject
*
obj
=
gObjectList
.
findObject
(
object_
override
.
mObjectI
d
);
LLViewerObject
*
obj
=
gObjectList
.
findObject
(
object_
i
d
);
if
(
results
.
size
()
>
0
)
{
...
...
@@ -287,7 +287,7 @@ class LLGLTFMaterialOverrideDispatchHandler : public LLDispatchHandler
// unblock material editor
if
(
obj
&&
obj
->
getTE
(
side
)
&&
obj
->
getTE
(
side
)
->
isSelected
())
{
doSelectionCallbacks
(
object_
override
.
mObjectI
d
,
side
);
doSelectionCallbacks
(
object_
i
d
,
side
);
}
}
...
...
@@ -300,7 +300,7 @@ class LLGLTFMaterialOverrideDispatchHandler : public LLDispatchHandler
obj
->
setTEGLTFMaterialOverride
(
i
,
nullptr
);
if
(
obj
->
getTE
(
i
)
&&
obj
->
getTE
(
i
)
->
isSelected
())
{
doSelectionCallbacks
(
object_
override
.
mObjectI
d
,
i
);
doSelectionCallbacks
(
object_
i
d
,
i
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment