Author: phoudoin Date: 2010-09-29 11:48:09 +0200 (Wed, 29 Sep 2010) New Revision: 38845 Changeset: http://dev.haiku-os.org/changeset/38845 Ticket: http://dev.haiku-os.org/ticket/6675 Modified: haiku/trunk/src/add-ons/print/drivers/pdf/source/PageSetupWindow.cpp Log: Cache the result value because after Quit() fResult member is no more available. Should fix #6675. Modified: haiku/trunk/src/add-ons/print/drivers/pdf/source/PageSetupWindow.cpp =================================================================== --- haiku/trunk/src/add-ons/print/drivers/pdf/source/PageSetupWindow.cpp 2010-09-29 09:47:36 UTC (rev 38844) +++ haiku/trunk/src/add-ons/print/drivers/pdf/source/PageSetupWindow.cpp 2010-09-29 09:48:09 UTC (rev 38845) @@ -355,11 +355,16 @@ { MoveTo(300,300); Show(); - acquire_sem(fExitSem); - Lock(); - Quit(); - return fResult; + while (acquire_sem(fExitSem) == B_INTERRUPTED) { + } + + // Have to cache the value since we delete ourself on Quit() + status_t result = fResult; + if (Lock()) + Quit(); + + return result; }