Cache the result value because after Quit() fResult member is no more available.

Should fix #6675.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38845 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin
2010-09-29 09:48:09 +00:00
parent 24fb5ed32c
commit fd7d3a7d40
@@ -355,11 +355,16 @@ PageSetupWindow::Go()
{
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;
}