#include <X11/extensions/XShm.h>
#include <X11/keysym.h>
-#include <Guid/PeiPeCoffLoader.h>
#include <Ppi/StatusCode.h>
#include <Library/PeCoffLib.h>
/* Destroy current buffer if created. */
if (drv->image != NULL)
{
+ /* Before destroy buffer, need to make sure the buffer available for access. */
XDestroyImage(drv->image);
if (drv->use_shm)