diff options
Diffstat (limited to 'record/record.c')
-rw-r--r-- | record/record.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/record/record.c b/record/record.c index f97626f73..cb7a6276c 100644 --- a/record/record.c +++ b/record/record.c @@ -127,11 +127,10 @@ static int numEnabledRCAPs; * returns an error. */ #define VERIFY_CONTEXT(_pContext, _contextid, _client) { \ - (_pContext) = (RecordContextPtr)LookupIDByType((_contextid), RTContext); \ - if (!(_pContext)) { \ - (_client)->errorValue = (_contextid); \ - return RecordErrorBase + XRecordBadContext; \ - } \ + int rc = dixLookupResourceByType((pointer *)&(_pContext), _contextid, \ + RTContext, _client, DixUseAccess); \ + if (rc != Success) \ + return (rc == BadValue) ? RecordErrorBase + XRecordBadContext : rc; \ } static int RecordDeleteContext( |