Fixed a nasty drone crash caused by incorrect usage of qPrintable() in a QtMsgHandler
This commit is contained in:
parent
4b19d8e1e7
commit
584362406e
@ -307,7 +307,9 @@ void RpcConnection::connIdMsgHandler(QtMsgType type, const char* msg)
|
|||||||
QString newMsg(*connId.localData());
|
QString newMsg(*connId.localData());
|
||||||
newMsg.append(msg);
|
newMsg.append(msg);
|
||||||
newMsg.replace(QChar('\n'), QString("\n").append(*connId.localData()));
|
newMsg.replace(QChar('\n'), QString("\n").append(*connId.localData()));
|
||||||
msg = qPrintable(newMsg);
|
fprintf(stderr, "%s\n", qPrintable(newMsg));
|
||||||
|
fflush(stderr);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "%s\n", msg);
|
fprintf(stderr, "%s\n", msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user