From fac51a63d81e850b316ae765ec415e35d396ba14 Mon Sep 17 00:00:00 2001 From: Ingo Date: Mon, 24 Mar 2014 21:19:15 +0100 Subject: [PATCH] Fixes a case of undefined behaviour when opening a new default window, Issue 2277 --- rtengine/procparams.h | 1 + rtgui/crophandler.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 6ec20cc63..1f43c8462 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -526,6 +526,7 @@ class CropParams { Glib::ustring orientation; Glib::ustring guide; + CropParams() :enabled(false), x(0),y(0),w(0),h(0),fixratio(false) {}; void mapToResized(int resizedWidth, int resizedHeight, int scale, int &x1, int &x2, int &y1, int &y2) const; }; diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index 8e8bb391e..3bc3b8218 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -28,7 +28,7 @@ using namespace rtengine; CropHandler::CropHandler () - : zoom(10), cx(0), cy(0), cw(0), ch(0), + : zoom(10), ww(0), wh(0), cx(0), cy(0), cw(0), ch(0), cropX(0), cropY(0), cropW(0), cropH(0), enabled(false), cropimg(NULL), cropimgtrue(NULL), ipc(NULL), crop(NULL), listener(NULL), isLowUpdatePriority(false) {