cwUi.cpp : Warn if the UI resource does not have a 'main' element.

This commit is contained in:
kevin 2022-12-20 10:33:51 -05:00
parent 49f1f8efcd
commit 5e90a9ff53

View File

@ -1207,7 +1207,9 @@ cw::rc_t cw::ui::create(
{
const object_t* main_obj = nullptr;
if((main_obj = uiRsrc->find( "main")) != nullptr )
if((main_obj = uiRsrc->find( "main")) == nullptr )
cwLogWarning("The UI resource does not have a 'main' element.");
else
if((rc = _createFromObj( p, main_obj, kInvalidId, kRootUuId, kInvalidId )) != kOkRC )
rc = cwLogError(rc,"Create from UI resource failed.");
}