Graphics: Add error check when create GraphicBuffer