Fix crash in libRocket by preventing access to unallocated memory