mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 17:05:45 +00:00
[Win32k]
- Fix crash when pcti is null. See bug 6759. svn path=/trunk/; revision=56531
This commit is contained in:
parent
b99fb7c724
commit
2e3ac87b3d
1 changed files with 6 additions and 3 deletions
|
@ -1821,7 +1821,10 @@ IntSetThreadDesktop(IN HDESK hDesktop,
|
||||||
|
|
||||||
pdeskOld = pti->rpdesk;
|
pdeskOld = pti->rpdesk;
|
||||||
hdeskOld = pti->hdesk;
|
hdeskOld = pti->hdesk;
|
||||||
pctiOld = pti->pcti;
|
if (pti->pcti != &pti->cti)
|
||||||
|
pctiOld = pti->pcti;
|
||||||
|
else
|
||||||
|
pctiOld = NULL;
|
||||||
|
|
||||||
/* do the switch */
|
/* do the switch */
|
||||||
if(pdesk != NULL)
|
if(pdesk != NULL)
|
||||||
|
@ -1850,7 +1853,7 @@ IntSetThreadDesktop(IN HDESK hDesktop,
|
||||||
pti->rpdesk = NULL;
|
pti->rpdesk = NULL;
|
||||||
pti->hdesk = NULL;
|
pti->hdesk = NULL;
|
||||||
pti->pDeskInfo = NULL;
|
pti->pDeskInfo = NULL;
|
||||||
pti->pcti = NULL;
|
pti->pcti = &pti->cti; // Always point inside so there will be no crash when posting or sending msg's!
|
||||||
pci->ulClientDelta = 0;
|
pci->ulClientDelta = 0;
|
||||||
pci->pDeskInfo = NULL;
|
pci->pDeskInfo = NULL;
|
||||||
pci->pClientThreadInfo = NULL;
|
pci->pClientThreadInfo = NULL;
|
||||||
|
@ -1860,7 +1863,7 @@ IntSetThreadDesktop(IN HDESK hDesktop,
|
||||||
if(pdeskOld != NULL)
|
if(pdeskOld != NULL)
|
||||||
{
|
{
|
||||||
RemoveEntryList(&pti->PtiLink);
|
RemoveEntryList(&pti->PtiLink);
|
||||||
DesktopHeapFree(pdeskOld, pctiOld);
|
if (pctiOld) DesktopHeapFree(pdeskOld, pctiOld);
|
||||||
IntUnmapDesktopView(pdeskOld);
|
IntUnmapDesktopView(pdeskOld);
|
||||||
ObDereferenceObject(pdeskOld);
|
ObDereferenceObject(pdeskOld);
|
||||||
ZwClose(hdeskOld);
|
ZwClose(hdeskOld);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue