Skip to content

Commit 3564e77

Browse files
kofa73TurboGit
authored andcommitted
Avoid null pointer dereference in dt_mipmap_cache_get_with_caller while logging
1 parent 100a471 commit 3564e77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/mipmap_cache.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ void dt_mipmap_cache_get_with_caller(
11521152
flags == DT_MIPMAP_PREFETCH_DISK ? "DT_MIPMAP_PREFETCH_DISK" : "",
11531153
flags == DT_MIPMAP_BLOCKING ? "DT_MIPMAP_BLOCKING" : "",
11541154
flags == DT_MIPMAP_BEST_EFFORT ? "DT_MIPMAP_BEST_EFFORT" : "",
1155-
imgid, mip, mode, buf->buf);
1155+
imgid, mip, mode, (buf ? buf->buf : NULL));
11561156
}
11571157

11581158
void dt_mipmap_cache_release_with_caller(dt_mipmap_cache_t *cache,

0 commit comments

Comments
 (0)