Make C API more robust against null contexts
Created attachment 202312 [details] Patch
Committed r150381: <http://trac.webkit.org/changeset/150381>