From fcc120ab3f2ba50ce581fc66be2d8101f494688a Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Sat, 14 Apr 2007 01:24:24 +0000 Subject: [PATCH] dhb Possible fix of segfault when cancel is pressed in label dialog. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4544 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/label/label.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bacula/src/qt-console/label/label.cpp b/bacula/src/qt-console/label/label.cpp index 03fd5ebaed..bb5e08dba1 100644 --- a/bacula/src/qt-console/label/label.cpp +++ b/bacula/src/qt-console/label/label.cpp @@ -71,7 +71,12 @@ void labelDialog::reject() { printf("Rejected\n"); this->hide(); - delete this; - mainWin->resetFocus(); m_console->notify(true); + /* believe use of member must occur before delete + * FIXME which do you like better + * delete this; + * or + * close(); */ + close(); + mainWin->resetFocus(); } -- 2.39.5