mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix crash when using /unstable-set-user-color without any arguments (#4574)
I told you it was unstable
This commit is contained in:
parent
6d2605d4ca
commit
2ed62165fa
|
@ -3190,14 +3190,16 @@ void CommandController::initialize(Settings &, Paths &paths)
|
|||
"works in Twitch channels"));
|
||||
return "";
|
||||
}
|
||||
auto userID = ctx.words.at(1);
|
||||
if (ctx.words.size() < 2)
|
||||
{
|
||||
ctx.channel->addMessage(
|
||||
makeSystemMessage(QString("Usage: %1 <TwitchUserID> [color]")
|
||||
.arg(ctx.words.at(0))));
|
||||
return "";
|
||||
}
|
||||
|
||||
auto userID = ctx.words.at(1);
|
||||
|
||||
auto color = ctx.words.value(2);
|
||||
|
||||
getIApp()->getUserData()->setUserColor(userID, color);
|
||||
|
|
Loading…
Reference in a new issue