From 91064fc625294d506c39f3df02978ead3ba064cd Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 5 Nov 2019 18:30:51 -0400 Subject: [PATCH] Fix error when using upload button more than once --- src/qml/Chat/Composer.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qml/Chat/Composer.qml b/src/qml/Chat/Composer.qml index 7df61e27..f2f06d84 100644 --- a/src/qml/Chat/Composer.qml +++ b/src/qml/Chat/Composer.qml @@ -216,6 +216,7 @@ Rectangle { HFileDialogOpener { dialog.title: qsTr("Select files to upload") onFileChanged: { + if (! file) return let path = Qt.resolvedUrl(file).replace(/^file:/, "") let args = [chatPage.roomId, path] py.callClientCoro(chatPage.userId, "send_file", args)