aboutsummaryrefslogtreecommitdiff
path: root/launcher/net/ByteArraySink.h
diff options
context:
space:
mode:
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