Page MenuHomePhabricator

elementary: Avoid segfault when part is not set.
ClosedPublic

Authored by lauromoura on Tue, Aug 13, 7:43 PM.

Details

Summary

Check whether we called efl_part_get before.

This was happening to C# bindings (maybe a bug there?) but in any case a
failure is safer than a segfault.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
lauromoura created this revision.Tue, Aug 13, 7:43 PM
lauromoura requested review of this revision.Tue, Aug 13, 7:43 PM

I do not understand how pd->pd could be NULL. Will be interesting to have a test scenario. I have some idea on how to make it more robust by setting the name and pd before finalize and check it there. So that we do not allocate a part that is not properly defined.

cedric requested changes to this revision.Wed, Aug 14, 11:18 AM

Better fix the bad scope get :-)

This revision now requires changes to proceed.Wed, Aug 14, 11:18 AM

Update getting the pd from the correct class and emitting the property,bound event.

cedric accepted this revision.Wed, Aug 14, 11:53 AM
This revision is now accepted and ready to land.Wed, Aug 14, 11:53 AM
This revision was automatically updated to reflect the committed changes.