xwayland: fix segment fault in `xwl_glamor_gbm_init_main_dev`
Function xwl_glamor_gbm_init_main_dev
does not check whether xwl_screen->default_feedback.main_dev
a.k.a. main_dev
is a valid pointer. This result in some special situation where main linux-dmabuf device is not accessible, such as KWin nested desktop, raising segment fault.
This commit add a null pointer check to prevent crashing.
Fixes: #1683 (closed)
Edited by Chenx Dust