We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5a0c34 commit 44c67b0Copy full SHA for 44c67b0
src/CameraSensor.cc
@@ -257,7 +257,8 @@ bool CameraSensor::CreateCamera()
257
this->dataPtr->camera->SetAspectRatio(static_cast<double>(width)/height);
258
this->dataPtr->camera->SetHFOV(angle);
259
260
- if (cameraSdf->Element()->HasElement("distortion")) {
+ if (cameraSdf->Element() != nullptr &&
261
+ cameraSdf->Element()->HasElement("distortion")) {
262
this->dataPtr->distortion =
263
ImageDistortionFactory::NewDistortionModel(*cameraSdf, "camera");
264
this->dataPtr->distortion->Load(*cameraSdf);
0 commit comments