[core] abort early when the dimension is 0

This commit is contained in:
Konstantin Käfer
2017-07-14 15:30:27 +02:00
parent 6b954677c0
commit fdfd5f91f5

View File

@@ -168,7 +168,7 @@ void Transform::flyTo(const CameraOptions &camera, const AnimationOptions &anima
double angle = camera.angle.value_or(getAngle());
double pitch = camera.pitch.value_or(getPitch());
if (std::isnan(zoom)) {
if (std::isnan(zoom) || state.size.isEmpty()) {
return;
}