some pointers checking, still bugged

This commit is contained in:
Liran BN 2014-09-11 23:08:37 +03:00
parent 375b72feac
commit e67505b9ee
2 changed files with 5 additions and 1 deletions

View file

@ -10,8 +10,10 @@ void CalendarManager::setCalendar(std::string html)
{
caliSchedPtr->setPage(html);
}
void CalendarManager::exportCalendarCSV()
void CalendarManager::exportCalendarCSV() //need to add fix to the null pointer bug
{
if (caliSchedPtr->getCourses()->empty())
return;
QMessageBox msgBox;
int buttonClicked = caliDialog->exec();
if (buttonClicked == 0) //cancel?

View file

@ -7,6 +7,8 @@ CSV_Exporter::CSV_Exporter()
bool CSV_Exporter::exportCalendar(calendarSchedule *calSched, CalendarDialog *cal)
{
if ((cal == NULL) || (calSched == NULL) || (calSched->getCourses() == NULL)) //pointers checking!
return false;
qDebug() << "Getting path for csv file from user...";
QString filePath = getFileFath();
if(filePath == NULL) //User canceled