Skip to content

Commit

Permalink
fix possible segfault in SoQTQuarterAdaptor::convertOrtho2Perspective
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Sep 19, 2019
1 parent dbf0644 commit a2b1fd2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Gui/Quarter/SoQTQuarterAdaptor.cpp
Expand Up @@ -258,6 +258,11 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setCameraType(SoType type)
void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::convertOrtho2Perspective(const SoOrthographicCamera* in,
SoPerspectiveCamera* out)
{
if (!in || !out) {
Base::Console().Log("Quarter::convertOrtho2Perspective",
"Cannot convert camera settings due to wrong input.");
return;
}
out->aspectRatio.setValue(in->aspectRatio.getValue());
out->focalDistance.setValue(in->focalDistance.getValue());
out->orientation.setValue(in->orientation.getValue());
Expand Down

0 comments on commit a2b1fd2

Please sign in to comment.