some pointers checking, still bugged
This commit is contained in:
parent
375b72feac
commit
e67505b9ee
2 changed files with 5 additions and 1 deletions
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue