Guard for app->io not being NULL

This one got swapped somewhere along the recent commits.