diff --git a/libs/libnx/nxtk/nxtk_opentoolbar.c b/libs/libnx/nxtk/nxtk_opentoolbar.c index 33ccdb4d072..5d00f37659d 100644 --- a/libs/libnx/nxtk/nxtk_opentoolbar.c +++ b/libs/libnx/nxtk/nxtk_opentoolbar.c @@ -78,7 +78,7 @@ int nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height, (FAR struct nxtk_framedwindow_s *)hfwnd; #ifdef CONFIG_DEBUG_FEATURES - if (hfwnd == NULL || cb == NULL) + if (hfwnd == NULL || cb == NULL || height < 1) { set_errno(EINVAL); return ERROR;