mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-08 06:46:00 +01:00
main: fix segfault when -c is given with no other arguments (#2470)
This commit is contained in:
parent
7f753cab9a
commit
d123835ef5
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
ignoreSudo = true;
|
ignoreSudo = true;
|
||||||
} else if (it->compare("-c") == 0 || it->compare("--config") == 0) {
|
} else if (it->compare("-c") == 0 || it->compare("--config") == 0) {
|
||||||
if (std::next(it)->c_str() == nullptr) {
|
if (std::next(it) == args.end()) {
|
||||||
help();
|
help();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue