diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-11-12 06:43:03 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-11-12 06:43:03 +0200 |
commit | eed83717b6125ba655be9ffd618f301ef97948b2 (patch) | |
tree | 8ff31be25370904bbe4a428b0b759f7a84b8e52a | |
parent | 531d64d880026e76836d15fc80adefd729c06281 (diff) |
Fixed crash if "open" command has no "url"
IssueID #385
-rw-r--r-- | src/app.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2626,7 +2626,11 @@ iBool handleCommand_App(const char *cmd) { | |||
2626 | return iTrue; | 2626 | return iTrue; |
2627 | } | 2627 | } |
2628 | else if (equal_Command(cmd, "open")) { | 2628 | else if (equal_Command(cmd, "open")) { |
2629 | iString *url = collectNewCStr_String(suffixPtr_Command(cmd, "url")); | 2629 | const char *urlArg = suffixPtr_Command(cmd, "url"); |
2630 | if (!urlArg) { | ||
2631 | return iTrue; /* invalid command */ | ||
2632 | } | ||
2633 | iString *url = collectNewCStr_String(urlArg); | ||
2630 | const iBool noProxy = argLabel_Command(cmd, "noproxy") != 0; | 2634 | const iBool noProxy = argLabel_Command(cmd, "noproxy") != 0; |
2631 | const iBool fromSidebar = argLabel_Command(cmd, "fromsidebar") != 0; | 2635 | const iBool fromSidebar = argLabel_Command(cmd, "fromsidebar") != 0; |
2632 | iUrl parts; | 2636 | iUrl parts; |