From 96427328b36f49f42862cd5030be908a3521dfba Mon Sep 17 00:00:00 2001 From: Oliver Duis Date: Thu, 11 Nov 2010 16:12:25 +0100 Subject: [PATCH] Fixed a crash on opening crop window (see second of the two issue in #314 for details) --- rtgui/imagearea.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index e24e2163d..b5506f1f7 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -229,7 +229,8 @@ void ImageArea::unGrabFocus () { } void ImageArea::addCropWindow () { - + if (!mainCropWindow) return; // if called but no image is loaded, it would crash + CropWindow* cw = new CropWindow (this, ipc); cw->zoom11(); cw->setCropGUIListener (cropgl);