Shortcuts: Fix use-after-free in EditWindow return.

Calling Quit() on the window deletes it, so using the fTextControl
member to get the result does not work.
This commit is contained in:
Michael Lotz
2015-04-11 13:39:33 +02:00
parent 827f11e986
commit abed891d1b
+3 -1
View File
@@ -68,7 +68,9 @@ EditWindow::Go()
CenterOnScreen();
acquire_sem(fSem);
BString result = fTextControl->Text();
if (Lock())
Quit();
return fTextControl->Text();
return result;
}