mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 15:34:13 +00:00
prevent crashing with buggy thread cleanup
svn path=/trunk/; revision=7170
This commit is contained in:
parent
52b2f9b429
commit
814b5b5e80
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: menu.c,v 1.34 2003/12/17 19:56:13 weiden Exp $
|
/* $Id: menu.c,v 1.35 2003/12/21 22:09:07 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -133,7 +133,14 @@ PMENU_OBJECT FASTCALL
|
||||||
IntGetMenuObject(HMENU hMenu)
|
IntGetMenuObject(HMENU hMenu)
|
||||||
{
|
{
|
||||||
PMENU_OBJECT MenuObject;
|
PMENU_OBJECT MenuObject;
|
||||||
NTSTATUS Status = ObmReferenceObjectByHandle(PsGetWin32Process()->
|
PW32PROCESS W32Process = PsGetWin32Process();
|
||||||
|
|
||||||
|
if(!W32Process)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
NTSTATUS Status = ObmReferenceObjectByHandle(W32Process->
|
||||||
WindowStation->HandleTable, hMenu, otMenu,
|
WindowStation->HandleTable, hMenu, otMenu,
|
||||||
(PVOID*)&MenuObject);
|
(PVOID*)&MenuObject);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
|
Loading…
Reference in a new issue