aboutsummaryrefslogtreecommitdiff
path: root/launcher/net/ByteArraySink.h
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-25 12:36:27 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-25 12:43:48 -0700
commitdf4fd7df7f98589c5dba85e4b5cdf0179a77faf5 (patch)
treeb382b0375a12d91305849f5dad41f4e0b04de8df /launcher/net/ByteArraySink.h
parentc8ff812ab89044890d88779e33f3c6f86c4b8f74 (diff)
parent1bd778d0ae27b3e87b800f773d5bc35708060c19 (diff)
downloadPrismLauncher-df4fd7df7f98589c5dba85e4b5cdf0179a77faf5.tar.gz
PrismLauncher-df4fd7df7f98589c5dba85e4b5cdf0179a77faf5.tar.bz2
PrismLauncher-df4fd7df7f98589c5dba85e4b5cdf0179a77faf5.zip
Merge remote-tracking branch 'upstream/develop' into refactor/net-split-headers-to-proxy-class
Diffstat (limited to 'launcher/net/ByteArraySink.h')
-rw-r--r--launcher/net/ByteArraySink.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/launcher/net/ByteArraySink.h b/launcher/net/ByteArraySink.h
index 728193b3..7b8f0f8a 100644
--- a/launcher/net/ByteArraySink.h
+++ b/launcher/net/ByteArraySink.h
@@ -1,7 +1,8 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
- * PolyMC - Minecraft Launcher
+ * Prism Launcher - Minecraft Launcher
* Copyright (c) 2022 flowln <flowlnlnln@gmail.com>
+ * Copyright (c) 2023 Trial97 <alexandru.tripon97@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -41,12 +42,10 @@ namespace Net {
/*
* Sink object for downloads that uses an external QByteArray it doesn't own as a target.
- * FIXME: It is possible that the QByteArray is freed while we're doing some operation on it,
- * causing a segmentation fault.
*/
class ByteArraySink : public Sink {
public:
- ByteArraySink(QByteArray* output) : m_output(output){};
+ ByteArraySink(std::shared_ptr<QByteArray> output) : m_output(output){};
virtual ~ByteArraySink() = default;
@@ -93,6 +92,6 @@ class ByteArraySink : public Sink {
auto hasLocalData() -> bool override { return false; }
private:
- QByteArray* m_output;
+ std::shared_ptr<QByteArray> m_output;
};
} // namespace Net