Compare commits

...

4 Commits

Author SHA1 Message Date
独角戏
03f9dfeee7
Pre Merge pull request !10 from 独角戏/Develope 2025-03-06 03:36:04 +00:00
Polarix
cf7eaf257f
!13 update GUI/src/SGUI_ItemsBase.c.
Merge pull request !13 from gdzx/N/A
2025-03-06 03:36:03 +00:00
gdzx
4335642b31
update GUI/src/SGUI_ItemsBase.c.
修复解引用空指针

Signed-off-by: gdzx <wy1107412334@163.com>
2025-03-05 14:47:51 +00:00
gaoxiao
8c393854a7 1.修复刷新函数空指针导致的异常。 2022-09-09 16:53:35 +08:00
2 changed files with 9 additions and 2 deletions

View File

@ -168,6 +168,7 @@ void SGUI_ItemsBase_Repaint(SGUI_SCR_DEV* pstDeviceIF, SGUI_ITEMS_BASE* pstObj)
SGUI_ITEMS_ITEM* pstPaintingItem;
SGUI_CSZSTR cszItemText;
SGUI_INT iItemPosY;
void* pVisiEndItem;
/*----------------------------------*/
/* Process */
@ -219,7 +220,8 @@ void SGUI_ItemsBase_Repaint(SGUI_SCR_DEV* pstDeviceIF, SGUI_ITEMS_BASE* pstObj)
/* Paint all visible item. */
pstPaintingItem = ITEMS_VISIBLE_START_ITEM(pstObj);
iItemPosY = pstObj->stLayout.iY + pstObj->iItemPaintOffset;
while((pstPaintingItem != ITEMS_VISIBLE_END_ITEM(pstObj)->pstNext) && (NULL != pstPaintingItem))
pVisiEndItem = ITEMS_VISIBLE_END_ITEM(pstObj) ? ITEMS_VISIBLE_END_ITEM(pstObj)->pstNext : NULL;
while((pstPaintingItem != pVisiEndItem) && (NULL != pstPaintingItem))
{
cszItemText = (NULL == pstPaintingItem->szVariableText) ? (pstPaintingItem->cszLabelText) : (pstPaintingItem->szVariableText);
SGUI_Basic_FillRectangleArea(pstDeviceIF, pstObj->stLayout.iX, iItemPosY, pstObj->stLayout.iWidth, ITEM_HEIGHT(pstObj->pstFontRes), pstPaintingItem==ITEMS_SENECT_ITEM(pstObj)?SGUI_COLOR_FRGCLR:SGUI_COLOR_BKGCLR);

View File

@ -128,7 +128,12 @@ HMI_ENGINE_RESULT HMI_StartEngine(const void* pstParameters)
if(NULL != pstStartScreen->pstActions->Prepare)
{
eProcessResult = pstStartScreen->pstActions->Prepare(g_pstActivedEngineObject->Interface, pstParameters);
g_pstActivedEngineObject->Interface->fnSyncBuffer();
if( (NULL != g_pstActivedEngineObject->Interface) &&
(NULL != g_pstActivedEngineObject->Interface->fnSyncBuffer))
{
g_pstActivedEngineObject->Interface->fnSyncBuffer();
}
}
}
}