File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -232,12 +232,15 @@ Local<Value> McClass::newCommand(const Arguments& args) {
232232
233233 try {
234234 auto name = args[0 ].asString ().toString ();
235- auto instance = ll::service::getCommandRegistry ()->findCommand (name);
236- if (instance) {
237- lse::getSelfPluginInstance ().getLogger ().info (
238- " Runtime command {} already exists, changes will not beapplied except for setOverload!" _tr (name)
239- );
240- return CommandClass::newCommand (name);
235+ auto registry = ll::service::getCommandRegistry ();
236+ if (registry) {
237+ auto instance = registry->findCommand (name);
238+ if (instance) {
239+ lse::getSelfPluginInstance ().getLogger ().info (
240+ " Runtime command {} already exists, changes will not beapplied except for setOverload!" _tr (name)
241+ );
242+ return CommandClass::newCommand (name);
243+ }
241244 }
242245
243246 auto desc = args[1 ].asString ().toString ();
You can’t perform that action at this time.
0 commit comments