if (Application* app = GetApplicationByID(app_id)) {
...
}