Ticket #5564: pginfo-crashes.patch
File pginfo-crashes.patch, 2.0 KB (added by , 17 years ago) |
---|
-
mythtv/programs/mythbackend/mainserver.cpp
3436 3436 ProgramInfo *pginfo = ProgramInfo::GetProgramFromRecorded(chanid, 3437 3437 startdt); 3438 3438 3439 if (commbreak) 3440 pginfo->GetCommBreakList(markMap); 3441 else 3442 pginfo->GetCutList(markMap); 3439 if (pginfo) { 3440 if (commbreak) 3441 pginfo->GetCommBreakList(markMap); 3442 else 3443 pginfo->GetCutList(markMap); 3443 3444 3444 for (it = markMap.begin(); it != markMap.end(); ++it) 3445 { 3446 rowcnt++; 3447 QString intstr = QString("%1").arg(it.data()); 3448 retlist << intstr; 3449 encodeLongLong(retlist,it.key()); 3445 for (it = markMap.begin(); it != markMap.end(); ++it) 3446 { 3447 rowcnt++; 3448 QString intstr = QString("%1").arg(it.data()); 3449 retlist << intstr; 3450 encodeLongLong(retlist,it.key()); 3451 } 3450 3452 } 3451 3453 3452 3454 if (rowcnt > 0) … … 3508 3510 QDateTime startdt; 3509 3511 startdt.setTime_t((uint)atoi(starttime)); 3510 3512 QStringList retlist; 3511 long long bookmark ;3513 long long bookmark = -1; 3512 3514 3513 3515 ProgramInfo *pginfo = ProgramInfo::GetProgramFromRecorded(chanid, 3514 3516 startdt); 3515 bookmark = pginfo->GetBookmark();3517 if (pginfo) bookmark = pginfo->GetBookmark(); 3516 3518 3517 3519 encodeLongLong(retlist,bookmark); 3518 3520 … … 3550 3552 3551 3553 ProgramInfo *pginfo = ProgramInfo::GetProgramFromRecorded(chanid, 3552 3554 startdt); 3553 pginfo->SetBookmark(bookmark); 3555 if (pginfo) { 3556 pginfo->SetBookmark(bookmark); 3557 retlist << "OK"; 3558 } 3559 else 3560 retlist << "FAILED"; 3554 3561 3555 retlist << "OK";3556 3562 if (pbssock) 3557 3563 SendResponse(pbssock, retlist); 3558 3564