mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 00:21:56 -07:00
main: fix segfault when -c is given with no other arguments (#2470)
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user