diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GipfelWidget.cxx | 7 | ||||
-rw-r--r-- | src/gipfel.cxx | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index 80cf05b..3922cce 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -103,11 +103,14 @@ GipfelWidget::load_image(char *file) { md->get_distortion_params(&pan->parms.k0, &pan->parms.k1, &pan->parms.x0); if (isnan(pan->parms.k0)) { char buf[1024]; - get_distortion_profile_name(buf, sizeof(buf)); - load_distortion_params(buf); + if (get_distortion_profile_name(buf, sizeof(buf)) == 0) { + load_distortion_params(buf); + } + if (isnan(pan->parms.k0)) { pan->parms.k0 = 0.0; } + if (isnan(pan->parms.k1)) { pan->parms.k1 = 0.0; } diff --git a/src/gipfel.cxx b/src/gipfel.cxx index b37bd28..b15153d 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -202,6 +202,7 @@ void load_distortion_cb(Fl_Widget *, void *) { char buf[1024]; const char * prof_name; + buf[0] = '\0'; gipf->get_distortion_profile_name(buf, sizeof(buf)); prof_name = fl_input("Load Distortion Profile", buf); |