Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
0308f051
Commit
0308f051
authored
Aug 12, 2004
by
Francois Bertel
Browse files
Made SetAttributeCollection ready for a null input argument
parent
0cb2515f
Changes
1
Show whitespace changes
Inline
Side-by-side
Common/vtkGenericSubdivisionErrorMetric.cxx
View file @
0308f051
...
...
@@ -19,7 +19,7 @@
#include
"vtkGenericAttributeCollection.h"
#include
"vtkGenericAdaptorCell.h"
vtkCxxRevisionMacro
(
vtkGenericSubdivisionErrorMetric
,
"1.
2
"
);
vtkCxxRevisionMacro
(
vtkGenericSubdivisionErrorMetric
,
"1.
3
"
);
vtkStandardNewMacro
(
vtkGenericSubdivisionErrorMetric
);
vtkCxxSetObjectMacro
(
vtkGenericSubdivisionErrorMetric
,
GenericCell
,
vtkGenericAdaptorCell
);
...
...
@@ -54,9 +54,18 @@ void vtkGenericSubdivisionErrorMetric::SetAttributeCollection(vtkGenericAttribut
delete
[]
this
->
Edge1Cache
;
delete
[]
this
->
Edge2Cache
;
}
if
(
this
->
AttributeCollection
!=
0
)
{
int
numComp
=
this
->
AttributeCollection
->
GetNumberOfComponents
();
this
->
Edge1Cache
=
new
double
[
numComp
+
3
];
this
->
Edge2Cache
=
new
double
[
numComp
+
3
];
}
else
{
this
->
Edge1Cache
=
0
;
this
->
Edge2Cache
=
0
;
}
}
...
...
Write
Preview
Supports
Markdown
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