Skip to content

Commit

Permalink
Fix crash on %u when launch called with no args
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd committed Aug 14, 2023
1 parent 4cf8dff commit dd5f71a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@ int Launcher::launch(QStringList args)
execLinePartsFromDesktopFile.pop_front();
for (const QString execLinePartFromDesktopFile : execLinePartsFromDesktopFile) {
if (execLinePartFromDesktopFile == "%f" || execLinePartFromDesktopFile == "%u")
constructedArgs.append(args[0]);
if(args.length() > 1) {
constructedArgs.append(args[0]);
}
else if (execLinePartFromDesktopFile == "%F" || execLinePartFromDesktopFile == "%U")
constructedArgs.append(args);
else
Expand Down

0 comments on commit dd5f71a

Please sign in to comment.