Hi,
I can confirm this bug. Kaffeine crashes when adding or modifying DVB
channels or recordings.
The issue is in SqlInterface::sqlFindFreeKey, where std::prev is called
with an invalid argument (-1).
I tested the following fix (removing the -1 argument), and it resolves the
crash:
--- a/src/sqlinterface.h
+++ b/src/sqlinterface.h
@@ -87,7 +87,7 @@
if (!container.isEmpty()) {
- sqlKey = SqlKey(std::prev(container.constEnd(), -1).key().sqlKey +
1);
+ sqlKey = SqlKey(std::prev(container.constEnd()).key().sqlKey + 1);
}
[...]
This patch works for me. Could it be integrated into the Debian package?
Regards,
[Dominique]