Cocoa Port: Fix a crash that can occur when taking a display window full screen while running macOS El Capitan. (Regression from commit ebc39eae.)
This commit is contained in:
parent
07aefbd02c
commit
7cccf90976
|
@ -1391,15 +1391,20 @@ MacGPUFetchObjectDisplayLink::MacGPUFetchObjectDisplayLink()
|
||||||
DisplayLinkListUpdate();
|
DisplayLinkListUpdate();
|
||||||
|
|
||||||
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(),
|
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(),
|
||||||
this,
|
this,
|
||||||
ScreenChangeCallback,
|
ScreenChangeCallback,
|
||||||
CFSTR("NSApplicationDidChangeScreenParametersNotification"),
|
CFSTR("NSApplicationDidChangeScreenParametersNotification"),
|
||||||
NULL,
|
NULL,
|
||||||
CFNotificationSuspensionBehaviorDeliverImmediately);
|
CFNotificationSuspensionBehaviorDeliverImmediately);
|
||||||
}
|
}
|
||||||
|
|
||||||
MacGPUFetchObjectDisplayLink::~MacGPUFetchObjectDisplayLink()
|
MacGPUFetchObjectDisplayLink::~MacGPUFetchObjectDisplayLink()
|
||||||
{
|
{
|
||||||
|
CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(),
|
||||||
|
this,
|
||||||
|
CFSTR("NSApplicationDidChangeScreenParametersNotification"),
|
||||||
|
NULL);
|
||||||
|
|
||||||
pthread_mutex_lock(&this->_mutexDisplayLinkLists);
|
pthread_mutex_lock(&this->_mutexDisplayLinkLists);
|
||||||
|
|
||||||
while (this->_displayLinksActiveList.size() > 0)
|
while (this->_displayLinksActiveList.size() > 0)
|
||||||
|
|
Loading…
Reference in New Issue