glXCreateContext and sharing lists

If one calls glXCreateContext( dsp, vis, shareMe, TRUE ) with shareMe a direct context and a direct context is not available, what will it do?

  1. Will it return an indirect context and generate a BadMatch error?
  2. Will it return an indirect context and no error?
  3. Will it return NULL?

If 1), is there a way to test for the availability of the context? Or how do I trap the BadMatch?

P.S> Env is Solaris 2.8

Thanks,