diff --git a/sys/shell/commands/sc_gnrc_6ctx.c b/sys/shell/commands/sc_gnrc_6ctx.c
index 29e21eb85002663c006432c1d3c762db54637249..c47242ac031fdeca5f1f43cc416431f938d3353d 100644
--- a/sys/shell/commands/sc_gnrc_6ctx.c
+++ b/sys/shell/commands/sc_gnrc_6ctx.c
@@ -91,7 +91,7 @@ int _gnrc_6ctx_add(char *cmd_str, char *ctx_str, char *prefix_str, char *ltime_s
         return 1;
     }
     prefix_len_str = strtok_r(NULL, "/", &save_ptr);
-    if (addr_str == NULL) {
+    if (prefix_len_str == 0) {
         _usage(cmd_str);
         return 1;
     }