Commit cc45e190265171dca5b7a8317906a7ddd730b082

Authored by Loic Dachary
1 parent 3c4a451b
Exists in master and in 2 other branches v2, v3

do not use gf_internal_t when it is null

Signed-off-by: Loic Dachary <loic@dachary.org>
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/gf.c
... ... @@ -795,7 +795,7 @@ void gf_set_region_data(gf_region_data *rd,
795 795  
796 796 if (align == -1) { /* JSP: This is cauchy. Error check bytes, then set up the pointers
797 797 so that there are no alignment regions. */
798   - if (bytes % h->w != 0) {
  798 + if (h != NULL && bytes % h->w != 0) {
799 799 fprintf(stderr, "Error in region multiply operation.\n");
800 800 fprintf(stderr, "The size must be a multiple of %d bytes.\n", h->w);
801 801 exit(1);
... ...