summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/GipfelWidget.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx
index e80d94c..591e4eb 100644
--- a/src/GipfelWidget.cxx
+++ b/src/GipfelWidget.cxx
@@ -521,7 +521,11 @@ GipfelWidget::get_tilt_angle() {
double
GipfelWidget::get_focal_length_35mm() {
- return pan->get_scale() * 35.0 / (double) img->w();
+ if (img == NULL) {
+ return NAN;
+ } else {
+ return pan->get_scale() * 35.0 / (double) img->w();
+ }
}
double