From 7b4504e34f2c6b235b5e1f8dbc2682bd8ccdfdd8 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Fri, 12 Jun 2020 10:49:11 -0700 Subject: [PATCH] Add pointer initializer to avoid segfaults PerspCorrection::metadata was not initialized, which could cause a segfault. --- rtgui/perspective.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/rtgui/perspective.cc b/rtgui/perspective.cc index 0607a7604..bdba2dcc1 100644 --- a/rtgui/perspective.cc +++ b/rtgui/perspective.cc @@ -38,6 +38,7 @@ PerspCorrection::PerspCorrection () : FoldableToolPanel(this, "perspective", M(" EvPerspProjRotate = mapper->newEvent(TRANSFORM, "HISTORY_MSG_PERSP_PROJ_ROTATE"); EvPerspProjShift = mapper->newEvent(TRANSFORM, "HISTORY_MSG_PERSP_PROJ_SHIFT"); lens_geom_listener = nullptr; + metadata = nullptr; Gtk::Image* ipersHL = Gtk::manage (new RTImage ("perspective-horizontal-left-small.png")); Gtk::Image* ipersHR = Gtk::manage (new RTImage ("perspective-horizontal-right-small.png"));