mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0030140: Modeling Algorithms - Access Null Pointer
The array TabP has been allocated correctly.
This commit is contained in:
parent
b8f7f6081f
commit
7e425ba7b0
@ -270,6 +270,7 @@ static Standard_Boolean FindPlane ( const Handle(Adaptor3d_HCurve)& theC,
|
|||||||
f = theC->FirstParameter();
|
f = theC->FirstParameter();
|
||||||
l = theC->LastParameter();
|
l = theC->LastParameter();
|
||||||
inv = 1./(nbp-1);
|
inv = 1./(nbp-1);
|
||||||
|
TabP = new (TColgp_HArray1OfPnt) (1, nbp);
|
||||||
for (ii=1; ii<=nbp; ii++) {
|
for (ii=1; ii<=nbp; ii++) {
|
||||||
t = ( f*(nbp-ii) + l*(ii-1));
|
t = ( f*(nbp-ii) + l*(ii-1));
|
||||||
t *= inv;
|
t *= inv;
|
||||||
|
22
tests/bugs/modalg_7/bug30140
Normal file
22
tests/bugs/modalg_7/bug30140
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "0030140: Modeling Algorithms - Access Null Pointer"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
line l_path 0 0 0 1 0 0
|
||||||
|
trim l_path l_path 0 10
|
||||||
|
circle c_profile 0 0 2 1 0 0 5
|
||||||
|
mkedge profile c_profile
|
||||||
|
wire profile profile
|
||||||
|
point dir 0 1 0
|
||||||
|
offsetcurve offset_path l_path 2 dir
|
||||||
|
mkedge path offset_path
|
||||||
|
wire path path
|
||||||
|
|
||||||
|
# Before the fix - Exception.
|
||||||
|
pipe result path profile 0
|
||||||
|
|
||||||
|
checkshape result
|
||||||
|
checkprops result -s 314.159
|
||||||
|
|
||||||
|
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user