From 8a0c99b379db2c7b7d1590553237560023d9f1e2 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 20 Apr 2010 23:44:40 +0100 Subject: [PATCH] st/egl: Check for null destroy callback on api struct --- src/gallium/state_trackers/egl/kms/native_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.30.2