fix crash under wayland

Authored by mvourlakos on Dec 1 2018, 10:27 AM.