diff options
author | marha <marha@users.sourceforge.net> | 2013-03-25 10:23:25 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-03-25 10:23:25 +0100 |
commit | 30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea (patch) | |
tree | 7ae924e3fb64c93a0f59e55fd08a914db9bb551b /xorg-server/Xext/sync.c | |
parent | 55a9a54c65cd0ff58966408ea4d7879a3d9c749c (diff) | |
parent | 176eab9e8277db1549bfc6c9ae805c4e1858f0b0 (diff) | |
download | vcxsrv-30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea.tar.gz vcxsrv-30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea.tar.bz2 vcxsrv-30ac3efa02bbd1aecff4a0aa2da17bc886bdd5ea.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig mesa pixman xserver git update 25 Mar 2013
Diffstat (limited to 'xorg-server/Xext/sync.c')
-rw-r--r-- | xorg-server/Xext/sync.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c index 3c9090e66..43ecd42cf 100644 --- a/xorg-server/Xext/sync.c +++ b/xorg-server/Xext/sync.c @@ -2746,7 +2746,6 @@ init_system_idle_counter(const char *name, int deviceid) { CARD64 resolution; XSyncValue idle; - IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv)); SyncCounter *idle_time_counter; IdleTimeQueryValue(NULL, &idle); @@ -2757,10 +2756,14 @@ init_system_idle_counter(const char *name, int deviceid) IdleTimeQueryValue, IdleTimeBracketValues); - priv->deviceid = deviceid; - priv->value_less = priv->value_greater = NULL; + if (idle_time_counter != NULL) { + IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv)); - idle_time_counter->pSysCounterInfo->private = priv; + priv->value_less = priv->value_greater = NULL; + priv->deviceid = deviceid; + + idle_time_counter->pSysCounterInfo->private = priv; + } return idle_time_counter; } @@ -2785,6 +2788,6 @@ void SyncRemoveDeviceIdleTime(SyncCounter *counter) /* FreeAllResources() frees all system counters before the devices are shut down, check if there are any left before freeing the device's counter */ - if (!xorg_list_is_empty(&SysCounterList)) + if (counter && !xorg_list_is_empty(&SysCounterList)) xorg_list_del(&counter->pSysCounterInfo->entry); } |