Bug Three

Something is wrong with the function f here. What is it?
#include <list>

using namespace std;

class A {
public:

	void g();

};

void f(list<A> &v, A &i) {
	if (v.size() == 0) return;
	v.pop_front();
	i.g();
}

int main() {
	return 0;
}

Answer