mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Fix possible crash when adding a tracker to a magnet torrent without metadata (Closes #1034254)
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#include <QDebug>
|
||||
#include "sessionapplication.h"
|
||||
|
||||
SessionApplication::SessionApplication(const QString &id, int &argc, char **argv) :
|
||||
@@ -42,3 +43,13 @@ void SessionApplication::commitData(QSessionManager & manager) {
|
||||
Q_UNUSED(manager);
|
||||
emit sessionIsShuttingDown();
|
||||
}
|
||||
|
||||
bool SessionApplication::notify(QObject* receiver, QEvent* event) {
|
||||
try {
|
||||
return QApplication::notify(receiver, event);
|
||||
} catch(const std::exception& e) {
|
||||
qCritical() << "Exception thrown:" << e.what() << ", receiver: " << receiver->objectName();
|
||||
receiver->dumpObjectInfo();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user