shm: assert sigbus_data is not NULL before member access

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
This commit is contained in:
U. Artie Eoff 2014-01-10 11:26:27 -08:00 committed by Kristian Høgsberg
parent 8a781aef0e
commit f97df69ee2

View File

@ -550,7 +550,7 @@ wl_shm_buffer_end_access(struct wl_shm_buffer *buffer)
struct wl_shm_sigbus_data *sigbus_data =
pthread_getspecific(wl_shm_sigbus_data_key);
assert(sigbus_data->access_count >= 1);
assert(sigbus_data && sigbus_data->access_count >= 1);
if (--sigbus_data->access_count == 0) {
if (sigbus_data->fallback_mapping_used) {