net: shell: ensure the shell `sh` is valid before call shell_printf
It is possible that the `sh` was not set before use.
This change adds a NULL check for `sh` in the following macros:
PR, PR_SHELL, PR_ERROR, PR_INFO, and PR_WARNING.
In case `sh` is NULL, the above macros will call `printk` instead.
Fixes #68793
Signed-off-by:
Pisit Sawangvonganan <pisit@ndrsolution.com>
Loading
Please sign in to comment