This repository was archived by the owner on Sep 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,10 @@ QSet<RamStatus *> RamScheduleDelegate::getDueTasks(QModelIndex index) const
305305 i.next ();
306306 if (i.value ()->completionRatio () >= 100 )
307307 tasks.remove (i.value ());
308+ if (!i.value ()->item ())
309+ tasks.remove (i.value ());
310+ if (!i.value ()->step ())
311+ tasks.remove (i.value ());
308312 }
309313
310314 return tasks;
Original file line number Diff line number Diff line change @@ -546,13 +546,16 @@ QString RamStatus::name() const
546546 RamAbstractItem *item = this ->item ();
547547 RamStep *step = this ->step ();
548548 RamState *state = this ->state ();
549+ if (!item || !step) return " Unknwown Task" ;
550+ if (!state) return item->name () + " | " + step->name ();
549551 return item->name () + " | " + step->name () + " | " + state->shortName ();
550552}
551553
552554QString RamStatus::shortName () const
553555{
554556 RamAbstractItem *item = this ->item ();
555557 RamStep *step = this ->step ();
558+ if (!item || !step) return " Task" ;
556559 return item->shortName () + " | " + step->shortName ();
557560}
558561
You can’t perform that action at this time.
0 commit comments