summaryrefslogtreecommitdiff
path: root/modules/brotli/enc/metablock_inc.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/brotli/enc/metablock_inc.h')
-rw-r--r--modules/brotli/enc/metablock_inc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/brotli/enc/metablock_inc.h b/modules/brotli/enc/metablock_inc.h
index dcc9d3c4a6..ed507ef5ef 100644
--- a/modules/brotli/enc/metablock_inc.h
+++ b/modules/brotli/enc/metablock_inc.h
@@ -71,7 +71,7 @@ static void FN(InitBlockSplitter)(
*histograms_size = max_num_types;
*histograms = BROTLI_ALLOC(m, HistogramType, *histograms_size);
self->histograms_ = *histograms;
- if (BROTLI_IS_OOM(m)) return;
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(*histograms)) return;
/* Clear only current histogram. */
FN(HistogramClear)(&self->histograms_[0]);
self->last_histogram_ix_[0] = self->last_histogram_ix_[1] = 0;