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:
@@ -68,7 +68,9 @@ EditWindow::Go()
|
||||
CenterOnScreen();
|
||||
|
||||
acquire_sem(fSem);
|
||||
BString result = fTextControl->Text();
|
||||
if (Lock())
|
||||
Quit();
|
||||
return fTextControl->Text();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user