summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qurl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index bda8e9bf23..81a8462657 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -2743,9 +2743,11 @@ QUrl QUrl::resolved(const QUrl &relative) const
// be non strict and allow scheme in relative url
if (!relative.d->scheme.isEmpty() && relative.d->scheme != d->scheme) {
t = relative;
+ t.detach();
} else {
if (relative.d->hasAuthority()) {
t = relative;
+ t.detach();
} else {
t.d = new QUrlPrivate;