summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/dive.h b/dive.h
index 0ff22e607..737278181 100644
--- a/dive.h
+++ b/dive.h
@@ -291,8 +291,9 @@ struct picture {
struct picture *next;
};
-#define FOR_EACH_PICTURE( DIVE ) \
- for(struct picture *picture = DIVE->picture_list; picture; picture = picture->next)
+#define FOR_EACH_PICTURE(_dive) \
+ if (_dive) \
+ for (struct picture *picture = (_dive)->picture_list; picture; picture = picture->next)
extern struct picture *alloc_picture();