One way to register a recognizer is to use RegularExpressionSP for the
module and symbol.
In order to match a symbol regardless of the module, the recognizer can
be registered with a nullptr for the module. However, this cause the
frame recognizer list command to crash because it calls
RegularExpression::GetText without checking if the shared pointer is valid.
This patch adds checks for the symbol and module RegularExpressionSP.
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Either check what's printed to the stream or just check the boolean, but there's no reason to add the printing logic if the result is not used.