Check building for damage. Leave the building in the case of severe damage. The building may be at risk of collapsing and will not withstand further quakes.
Exercise caution when leaving the building. Pieces of masonry, roof beams, tiles, and the like may still fall off.
Check the building and surrounding area for potential fires. When possible, extinguish small fires and / or alert the fire service.