libs/libnx/nxtk/nxtk_opentoolbar.c: Refuse to open a toolbar of height zero.

This commit is contained in:
Gregory Nutt 2019-05-10 08:30:09 -06:00
parent 05ce221523
commit 392809fae5

View File

@ -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;