Prevent segfault in gfx_ctx_get_metrics
This commit is contained in:
parent
7bfca05272
commit
b818038314
|
@ -174,6 +174,8 @@ bool gfx_ctx_get_metrics(enum display_metric_types type, float *value)
|
||||||
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
|
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
|
||||||
if (!ctx || !driver)
|
if (!ctx || !driver)
|
||||||
return false;
|
return false;
|
||||||
|
if (!ctx->get_metrics)
|
||||||
|
return false;
|
||||||
return ctx->get_metrics(driver->video_context_data, type,
|
return ctx->get_metrics(driver->video_context_data, type,
|
||||||
value);
|
value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue