mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
libs/libnx/nxtk/nxtk_opentoolbar.c: Refuse to open a toolbar of height zero.
This commit is contained in:
@@ -78,7 +78,7 @@ int nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height,
|
|||||||
(FAR struct nxtk_framedwindow_s *)hfwnd;
|
(FAR struct nxtk_framedwindow_s *)hfwnd;
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_FEATURES
|
#ifdef CONFIG_DEBUG_FEATURES
|
||||||
if (hfwnd == NULL || cb == NULL)
|
if (hfwnd == NULL || cb == NULL || height < 1)
|
||||||
{
|
{
|
||||||
set_errno(EINVAL);
|
set_errno(EINVAL);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
|||||||
Reference in New Issue
Block a user