pixelpipe_get_histogram_backbuf() can be called with piece set to NULL, which can lead to crashes under some conditions (e.g. when the crop filter is active) as it is directly dereferenced without checking its validity. Such a crash is mentioned in issue #357.
This PR adds a null pointer check before dereferencing piece, making the function return early if it is not successful.
pixelpipe_get_histogram_backbuf() can be called with
piece
set to NULL, which can lead to crashes under some conditions (e.g. when the crop filter is active) as it is directly dereferenced without checking its validity. Such a crash is mentioned in issue #357.This PR adds a null pointer check before dereferencing
piece
, making the function return early if it is not successful.