USSD/hlr_vty.c: print error if EUSE is not found
Change-Id: I18045c5e544a99b2414a6f0268f1343df119b9f3
diff --git a/src/hlr_vty.c b/src/hlr_vty.c
index 9532a03..2d9b929 100644
--- a/src/hlr_vty.c
+++ b/src/hlr_vty.c
@@ -193,7 +193,13 @@
USSD_STR "Configure default-route for all USSD to unknown destinations\n"
EXT_STR)
{
- struct hlr_euse *euse = euse_find(g_hlr, argv[0]);
+ struct hlr_euse *euse;
+
+ euse = euse_find(g_hlr, argv[0]);
+ if (!euse) {
+ vty_out(vty, "%% Cannot find EUSE %s%s", argv[0], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
if (g_hlr->euse_default != euse) {
vty_out(vty, "Switching default route from %s to %s%s",