diff options
author | Anuj Phogat <[email protected]> | 2012-01-17 13:21:52 -0800 |
---|---|---|
committer | Anuj Phogat <[email protected]> | 2012-01-17 16:58:38 -0800 |
commit | ce1c949b162260cec84431913f7aac83cb1b938e (patch) | |
tree | 31aef2b335d7e9a6a811f24bf9746a89f3374724 /src/mesa | |
parent | 46ce25722b364ae7fa20b61e60eff4be5ad051d3 (diff) |
intel: Return if pointer to intel_context is null
It is better to test if(intel == NULL) and simply return in that case.
Signed-off-by: Anuj Phogat <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index a08f3d12b67..0566907fb3d 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -114,16 +114,16 @@ intelDRI2Flush(__DRIdrawable *drawable) { GET_CURRENT_CONTEXT(ctx); struct intel_context *intel = intel_context(ctx); + if (intel == NULL) + return; - if (intel != NULL) { - if (intel->gen < 4) - INTEL_FIREVERTICES(intel); + if (intel->gen < 4) + INTEL_FIREVERTICES(intel); - intel->need_throttle = true; + intel->need_throttle = true; - if (intel->batch.used) - intel_batchbuffer_flush(intel); - } + if (intel->batch.used) + intel_batchbuffer_flush(intel); } static const struct __DRI2flushExtensionRec intelFlushExtension = { |