mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-18 03:41:27 +02:00
don't crash when jason tries to use tomahawk
This commit is contained in:
@@ -682,6 +682,9 @@ void QxtHttpSessionManager::sendNextBlock(int requestID)
|
||||
{
|
||||
QSharedPointer<QIODevice>& dataSource = connector()->getRequestDataSource( requestID );
|
||||
QIODevice* device = connector()->getRequestConnection(requestID);
|
||||
if (!device)
|
||||
return;
|
||||
|
||||
if (!qxt_d().connectionState.contains(device)) return; // in case a disconnect signal and a bytesWritten signal get fired in the wrong order
|
||||
QxtHttpSessionManagerPrivate::ConnectionState& state = qxt_d().connectionState[device];
|
||||
if (state.finishedTransfer) return;
|
||||
|
@@ -323,6 +323,11 @@ namespace QxtMetaObject
|
||||
*/
|
||||
bool connect(QObject* sender, const char* signal, QxtBoundFunction* slot, Qt::ConnectionType type)
|
||||
{
|
||||
if (!sender)
|
||||
{
|
||||
qWarning() << "Got connect() with a null sender!";
|
||||
return false;
|
||||
}
|
||||
const QMetaObject* meta = sender->metaObject();
|
||||
int methodID = meta->indexOfMethod(meta->normalizedSignature(signal).mid(1).constData());
|
||||
if (methodID < 0)
|
||||
|
Reference in New Issue
Block a user