diff options
| author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2007-07-27 17:02:24 +0200 |
|---|---|---|
| committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2007-07-27 17:02:24 +0200 |
| commit | 7a3addfd66c6b310e5bb32d831a3b362245fee11 (patch) | |
| tree | d7fb7bab18c9ffb31ba9c193fa056284b4d1e9ad /src/GipfelWidget.cxx | |
| parent | 68e76211dffad356f35f381cd2d9103029e92e9b (diff) | |
check whether get_distortion_profile_name() succeeded
Diffstat (limited to 'src/GipfelWidget.cxx')
| -rw-r--r-- | src/GipfelWidget.cxx | 7 |
1 files changed, 5 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; } |
