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();
|
CenterOnScreen();
|
||||||
|
|
||||||
acquire_sem(fSem);
|
acquire_sem(fSem);
|
||||||
|
BString result = fTextControl->Text();
|
||||||
if (Lock())
|
if (Lock())
|
||||||
Quit();
|
Quit();
|
||||||
return fTextControl->Text();
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user