From 9d9e34a0c0704388b718619eea0c74e533e178d0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 1 Nov 2010 15:25:28 +0000 Subject: rhbz#648475# crash in scanner dialog, reset link in dtor --- extensions/source/scanner/sanedlg.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 759c5c88e..159c8afd5 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -133,6 +133,7 @@ SaneDlg::SaneDlg( Window* pParent, Sane& rSane ) : SaneDlg::~SaneDlg() { + mrSane.SetReloadOptionsHdl( maOldLink ); } short SaneDlg::Execute() @@ -479,14 +480,12 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton ) { double fRes = (double)maReslBox.GetValue(); SetAdjustedNumericalValue( "resolution", fRes ); - mrSane.SetReloadOptionsHdl( maOldLink ); UpdateScanArea( TRUE ); SaveState(); EndDialog( mrSane.IsOpen() ? 1 : 0 ); } else if( pButton == &maCancelButton ) { - mrSane.SetReloadOptionsHdl( maOldLink ); mrSane.Close(); EndDialog( 0 ); } @@ -689,9 +688,9 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit*, pEdit ) IMPL_LINK( SaneDlg, ReloadSaneOptionsHdl, Sane*, /*pSane*/ ) { - mnCurrentOption = -1; - mnCurrentElement = 0; - DisableOption(); + mnCurrentOption = -1; + mnCurrentElement = 0; + DisableOption(); // #92024# preserve preview rect, should only be set // initially or in AcquirePreview Rectangle aPreviewRect = maPreviewRect; -- cgit v1.2.3