From: Jakob Bornecrantz Date: Tue, 20 Apr 2010 22:44:40 +0000 (+0100) Subject: st/egl: Check for null destroy callback on api struct X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8a0c99b379db2c7b7d1590553237560023d9f1e2;p=mesa.git st/egl: Check for null destroy callback on api struct --- diff --git a/src/gallium/state_trackers/egl/kms/native_kms.c b/src/gallium/state_trackers/egl/kms/native_kms.c index 860657349bc..79645865f3b 100644 --- a/src/gallium/state_trackers/egl/kms/native_kms.c +++ b/src/gallium/state_trackers/egl/kms/native_kms.c @@ -680,7 +680,7 @@ kms_display_destroy(struct native_display *ndpy) if (kdpy->fd >= 0) drmClose(kdpy->fd); - if (kdpy->api) + if (kdpy->api && kdpy->api->destroy) kdpy->api->destroy(kdpy->api); FREE(kdpy); }