Why am I getting a segemetation fault

This is a function of Menu class.
The odd thing is even if I comment ou this line it causes Seg fault. Basically if I do anything even if I do this->option_list[this->count - 1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  void Menu::pop_back() {
	cout << "INPOP_BACK\n";
	cout << this->count<<"\n";
	cout << this->isEmpty()<<"\n";
	if(this->isEmpty()){
		cout << "There is nothing to remove";
	}else{
		cout<< "inside POP_BACK \n";
		cout << this->option_list[this->count - 1] << "\n";
		this->option_list[this->count - 1].set(NULL); //Segmentation fault here
		this->count = this->count - 1;
	}
}
Please don't start a new topic about the same subject, just keep the original topic going. Have you tried the advice given in the previous answers?
Topic archived. No new replies allowed.