Skip to content
Commit 2720f349 authored by Milian Wolff's avatar Milian Wolff Committed by Friedrich W. H. Kossebau
Browse files

Don't crash when signatures don't match in AdaptSignatureAssistant

When the old positions overflow the new list of available declarations,
do not crash. This could happen due to parse errors or any other
discrepancy in counts. Should fixes the following assert I just
encountered:

```
[KCrash Handler]
#6  0x00007fc6324a3f25 in raise () from /usr/lib/libc.so.6
#7  0x00007fc63248d897 in abort () from /usr/lib/libc.so.6
#8  0x00007fc632a0996c in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/libQt5Core.so.5
#9  0x00007fc632a08d52 in qt_assert_x(char const*, char const*, char const*, int) () from /usr/lib/libQt5Core.so.5
#10 0x00007fc5f508be69 in QVector<KDevelop::Declaration*>::operator[] (this=0x7ffc9cfb01a0, i=1) at /usr/include/qt/QtCore/qvector.h:463
#11 0x00007fc5f508a4a6 in AdaptSignatureAssistant::getRenameActions (this=0x5621d5cd80e0, newSignature=..., oldPositions=...) at /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/plugins/clang/codegen/adaptsignatureassistant.cpp:246
```

(cherry picked from commit a5cf36fe)
parent 42afa5aa
Pipeline #13832 failed with stage
in 1 hour
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment