diff --git a/mantidimaging/core/utility/histogram.py b/mantidimaging/core/utility/histogram.py index 8caeb0345b0..0ed2b63a65c 100644 --- a/mantidimaging/core/utility/histogram.py +++ b/mantidimaging/core/utility/histogram.py @@ -17,7 +17,8 @@ def set_histogram_log_scale(histogram: HistogramLUTItem) -> None: :param histogram: The HistogramLUTItem of an image. """ x_data, y_data = histogram.plot.getData() - histogram.plot.setData(x_data, np.log(y_data + 1)) + if y_data is not None: + histogram.plot.setData(x_data, np.log(y_data + 1)) def generate_histogram_from_image(image_data: np.ndarray, num_bins: int = DEFAULT_NUM_BINS) -> tuple: