Skip to content

Draft: Fix crash on empty PlotList

Thomas Stibor requested to merge tstibor/kstars:fix_crash_altvstime into master

When PlotList is empty avtUI->PlotList->currentRow() return -1 and pList.at(-1) hits an assertion:

ASSERT failure in QList<T>::at: "index out of range", file /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h, line 571

Thread 1 "kstars" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44      ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
    (_o=0x7fff70014c70, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fffffffd2e0)
    at /home/tstibor/astronomy/kstars/kstars/build/kstars/KStarsLib_autogen/CB6E7VNMGS/moc_altvstime.cpp:213

Merge request reports

Loading