fixed memory access violation
This commit is contained in:
parent
aa77c14a51
commit
2587b2c0f2
@ -16,7 +16,7 @@
|
|||||||
#include <uploaders/default/gdrivesettingsdialog.hpp>
|
#include <uploaders/default/gdrivesettingsdialog.hpp>
|
||||||
|
|
||||||
struct SegfaultWorkaround { // I'm a scrub for doing this
|
struct SegfaultWorkaround { // I'm a scrub for doing this
|
||||||
SegfaultWorkaround(QByteArray a, GDriveUploader *u, QString m, bool isPublic, ScreenshotFile sf) : byteArray(), dis(u), mime(m) {
|
SegfaultWorkaround(QByteArray a, GDriveUploader *u, QString m, bool ip, ScreenshotFile f) : byteArray(), dis(u), mime(m), isPublic(ip), sf(f) {
|
||||||
a.swap(byteArray);
|
a.swap(byteArray);
|
||||||
QJsonObject object;
|
QJsonObject object;
|
||||||
object.insert("client_id", settings::settings().value("google/cid").toString());
|
object.insert("client_id", settings::settings().value("google/cid").toString());
|
||||||
@ -43,6 +43,7 @@ struct SegfaultWorkaround { // I'm a scrub for doing this
|
|||||||
settings::settings().setValue("google/access", token);
|
settings::settings().setValue("google/access", token);
|
||||||
|
|
||||||
dis->handleSend(token.prepend("Bearer "), isPublic, mime, byteArray, sf);
|
dis->handleSend(token.prepend("Bearer "), isPublic, mime, byteArray, sf);
|
||||||
|
|
||||||
QScopedPointer<SegfaultWorkaround>(this);
|
QScopedPointer<SegfaultWorkaround>(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user