Backport crash fix to 0.15
This is a backport of 808e6602 to the 0.15 series. I understand that 0.15.1 is an old version, but I figured distros might want this patch for backporting purposes, and this did trip up my compositor. Feel free to close if so desired.