Commit 4317f140 authored by Rafał Malinowski's avatar Rafał Malinowski

gui: fix pasting urls into chat

Signed-off-by: Rafał Malinowski's avatarRafał Malinowski <>
parent e566f7b0
......@@ -271,10 +271,10 @@ void CustomInput::insertFromMimeData(const QMimeData *source)
if (source->hasUrls() && !source->urls().isEmpty())
QUrl url = source->urls().first();
if (CurrentImageStorageService)
if (!url.toString().isEmpty() && CurrentImageStorageService)
url = CurrentImageStorageService->toFileUrl(url);
if (!url.isEmpty() && url.scheme() == "file")
if (!url.toString().isEmpty() && url.scheme() == "file")
path = QDir::cleanPath(url.path());
if (QImage(path).isNull())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment