void
context_enter (fips_api_t api, void *system_context_id)
{
+ /* Do nothing for a NULL system_context_id. (Don't ask me why,
+ * but Dota 2 likes to call MakeCurrent with a NULL context ID
+ * just before calling MakeCurrent with the same context it
+ * had been using before. We want to do nothing in this case.)
+ */
+ if (system_context_id == NULL)
+ return;
+
/* Do nothing if the application is setting the same context
* as is already current. */
if (current_context && current_context->system_id == system_context_id)
if (ctx == NULL)
return;
- metrics_destroy (ctx->metrics);
+ metrics_fini (ctx->metrics);
}
void