this commit prevents segfaults in case of opencl disabled
Merge pull request #2077 from ilya-lavrenov:tapi_context