From 0ad5f9587f3a14fd28548616948ef0f9fac6a2e2 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Sat, 26 Sep 2020 12:40:14 -0700 Subject: [PATCH] Fix segfault Make sure histogramRGBArea isn't null before using it. --- rtgui/histogrampanel.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 68f0d91b6..93091733c 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -295,7 +295,9 @@ HistogramPanel::HistogramPanel () : type_changed(); updateHistAreaOptions(); - updateHistRGBAreaOptions(); + if (histogramRGBArea) { + updateHistRGBAreaOptions(); + } setExpandAlignProperties(showRed , false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); setExpandAlignProperties(showGreen, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);