libs/libnx/nxmu/: Add a few bad input parameter checks. configs/lpcxpresso-lpc54628/twm4nx/defconfig: Need to enable the NX library.

This commit is contained in:
Gregory Nutt
2019-05-12 14:42:27 -06:00
parent 611a87075c
commit 4f31eec94e
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ int nxtk_setsize(NXTKWINDOW hfwnd, FAR const struct nxgl_size_s *size)
int ret;
#ifdef CONFIG_DEBUG_FEATURES
if (hfwnd == NULL || size == NULL)
if (hfwnd == NULL || size == NULL || size->w < 0 || size->h < 0)
{
set_errno(EINVAL);
return ERROR;