Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Christian Butz
VTK
Commits
b4f82d8e
Commit
b4f82d8e
authored
Jun 18, 2010
by
Aashish Chaudhary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG: Fixed the crash when edge data array is set but not found.
This could also happen when the array is not a data array.
parent
af651d2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
Infovis/vtkBoostBrandesCentrality.cxx
Infovis/vtkBoostBrandesCentrality.cxx
+8
-1
No files found.
Infovis/vtkBoostBrandesCentrality.cxx
View file @
b4f82d8e
...
...
@@ -100,6 +100,13 @@ int vtkBoostBrandesCentrality::RequestData(
vtkDataArray
*
weights
=
input
->
GetEdgeData
()
->
GetArray
(
this
->
EdgeWeightArrayName
);
if
(
!
weights
)
{
vtkErrorMacro
(
<<
"Error: Edge weight array "
<<
this
->
EdgeWeightArrayName
<<
" is set but not found or not a data array.
\n
"
);
return
0
;
}
edgeWeight
.
TakeReference
(
vtkDataArray
::
CreateDataArray
(
weights
->
GetDataType
()));
...
...
@@ -120,7 +127,7 @@ int vtkBoostBrandesCentrality::RequestData(
if
(
!
edgeWeight
)
{
vtkErrorMacro
(
<<
"Error: Edge weight array "
<<
this
->
EdgeWeightArrayName
<<
" is set but not found.
\n
"
);
<<
" is set but not found
or not a data array
.
\n
"
);
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment