Skip to content

Commit aa8414f

Browse files
authored
Fix segv with PyTable.C (#17396)
Added check for size of results vector before referencing elements.
1 parent 8c7d84e commit aa8414f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/visitpy/common/PyTable.C

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ TakeQueryAttributesResults(QueryAttributes &qA, float *buff)
5858
// Move the vector in so that it gets destroyed at the end of the function
5959
std::vector<float> results = std::move(qA.GetFloatResultsValue());
6060
std::cout << "Taking float query attribute results!" << std::endl;
61-
std::cout << results[0] << ", " << results[1] << ", " << results[2] << std::endl;
61+
if(results.size() == 3)
62+
std::cout << results[0] << ", " << results[1] << ", " << results[2] << std::endl;
6263
memcpy(buff, results.data(), results.size() * sizeof(float));
6364
}
6465

0 commit comments

Comments
 (0)