extensions: plugin: UNX: don't crash headless
This commit is contained in:
@@ -523,7 +523,10 @@ void XPlugin_Impl::loadPlugin()
|
|||||||
}
|
}
|
||||||
const SystemEnvData* pEnvData = getSysChildSysData();
|
const SystemEnvData* pEnvData = getSysChildSysData();
|
||||||
#if defined( UNX ) && !(defined(QUARTZ))
|
#if defined( UNX ) && !(defined(QUARTZ))
|
||||||
XSync( (Display*)pEnvData->pDisplay, False );
|
if (pEnvData->pDisplay) // headless?
|
||||||
|
{
|
||||||
|
XSync( (Display*)pEnvData->pDisplay, False );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if( ! getPluginComm() )
|
if( ! getPluginComm() )
|
||||||
{
|
{
|
||||||
@@ -568,8 +571,15 @@ void XPlugin_Impl::loadPlugin()
|
|||||||
// m_aNPWindow is set up in the MacPluginComm from the view
|
// m_aNPWindow is set up in the MacPluginComm from the view
|
||||||
SetSysPlugDataParentView(*pEnvData);
|
SetSysPlugDataParentView(*pEnvData);
|
||||||
#elif defined( UNX )
|
#elif defined( UNX )
|
||||||
XSync( (Display*)pEnvData->pDisplay, False );
|
if (pEnvData->pDisplay) // headless?
|
||||||
m_aNPWindow.window = (void*)pEnvData->aWindow;
|
{
|
||||||
|
XSync( (Display*)pEnvData->pDisplay, False );
|
||||||
|
m_aNPWindow.window = (void*)pEnvData->aWindow;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_aNPWindow.window = NULL;
|
||||||
|
}
|
||||||
m_aNPWindow.ws_info = NULL;
|
m_aNPWindow.ws_info = NULL;
|
||||||
#else
|
#else
|
||||||
m_aNPWindow.window = (void*)pEnvData->hWnd;
|
m_aNPWindow.window = (void*)pEnvData->hWnd;
|
||||||
|
Reference in New Issue
Block a user