Inside the call to GPU_ResetRendererState cdata->last_target is not NULL and during the line:
extBindFramebuffer(renderer, ((GPU_TARGET_DATA*)cdata->last_target->data)->handle);
the handle and rest of the data is invalid. I think it was previously freed.
That sounds right. The GL renderers' Free*() functions should be fixed so they NULL out the necessary internal state variables. Thanks for pointing this out!
By using the following code I believe I can cause last_target->data to be in an invalid state which could cause a crash.
Inside the call to GPU_ResetRendererState cdata->last_target is not NULL and during the line:
extBindFramebuffer(renderer, ((GPU_TARGET_DATA*)cdata->last_target->data)->handle);
the handle and rest of the data is invalid. I think it was previously freed.