]> git.tdb.fi Git - ext/subsurface.git/blobdiff - profile.c
Fix default size for scrollable notebook
[ext/subsurface.git] / profile.c
index 614822809f53dd59bcb6ad2575f51b5e8207e398..d3362432effe11b1e0680e9e131d6f457aa5560d 100644 (file)
--- a/profile.c
+++ b/profile.c
@@ -14,6 +14,7 @@
 #include "color.h"
 
 int selected_dive = 0;
+int *selectiontracker;
 
 typedef enum { STABLE, SLOW, MODERATE, FAST, CRAZY } velocity_t;
 
@@ -1048,16 +1049,18 @@ static void fill_missing_tank_pressures(struct plot_info *pi, pr_track_t **track
                                /* there may be multiple segments - so
                                 * let's assemble the length */
                                nlist = list;
-                               pt = list->pressure_time;
-                               while (!nlist->end) {
-                                       nlist = nlist->next;
-                                       if (!nlist) {
-                                               /* oops - we have no end pressure,
-                                                * so this means this is a tank without
-                                                * gas consumption information */
-                                               break;
+                               if (list) {
+                                       pt = list->pressure_time;
+                                       while (!nlist->end) {
+                                               nlist = nlist->next;
+                                               if (!nlist) {
+                                                       /* oops - we have no end pressure,
+                                                        * so this means this is a tank without
+                                                        * gas consumption information */
+                                                       break;
+                                               }
+                                               pt += nlist->pressure_time;
                                        }
-                                       pt += nlist->pressure_time;
                                }
                                if (!nlist) {
                                        /* just continue without calculating