Skip to content

Commit 7093c75

Browse files
committed
Fix autoscaling errors
1 parent 134c973 commit 7093c75

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/astroGraphics/ephemeris.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,14 @@ maximum_star_label_count=%d # %s\n\
329329
void ephemerides_autoscale_plot(chart_config *s, const int total_ephemeris_points) {
330330
int i, j, k;
331331

332+
// If we have no ephemerides, do not attempt autoscaling
333+
if (s->ephemeris_final_count < 1) {
334+
if (s->ephemeris_autoscale) {
335+
stch_error("Plot autoscaling failure: there are no ephemerides to autoscale to.");
336+
}
337+
return;
338+
}
339+
332340
// Track the sky coverage of each ephemeris in RA and Dec
333341
// Create a coarse grid of RA and Declination where we set Boolean flags for whether the solar system object passes
334342
// through each cell.

0 commit comments

Comments
 (0)