From 6a2b0eeb1cd2df5cc7cc2e782337c42b26c37ddc Mon Sep 17 00:00:00 2001 From: Barry <870709864@qq.com> Date: Wed, 22 Jun 2022 20:34:39 +0800 Subject: [PATCH] fix: error log open file failed --- QtScrcpy/ui/dialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/QtScrcpy/ui/dialog.cpp b/QtScrcpy/ui/dialog.cpp index 6b0e84a..1cb80ea 100644 --- a/QtScrcpy/ui/dialog.cpp +++ b/QtScrcpy/ui/dialog.cpp @@ -233,6 +233,10 @@ void Dialog::delayMs(int ms) QString Dialog::getGameScript(const QString &fileName) { + if (fileName.isEmpty()) { + return ""; + } + QFile loadFile(getKeyMapPath() + "/" + fileName); if (!loadFile.open(QIODevice::ReadOnly)) { outLog("open file failed:" + fileName, true);