Page MenuHomePhabricator

elementary: Avoid passing NULL in some win focus methods
ClosedPublic

Authored by segfaultxavi on Jul 9 2018, 8:38 AM.

Details

Summary

This one is rather harmless, as the NULL returned by this fuction is handled
correctly in all places, but this commit removes the runtime warning.

ref T7030

Test Plan

After this commit the warning disappears. Got the warning with win_example.

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.
segfaultxavi created this revision.Jul 9 2018, 8:38 AM
segfaultxavi requested review of this revision.Jul 9 2018, 8:38 AM

Thought I might comment a bit on the fix... using while instead of do...while makes sure that NULL obj is immediately discarded and NULL is returned. This seemed more efficient (and funnier, and more elegant) than adding an extra if (!obj) return NULL.

netstar added a subscriber: netstar.Jul 9 2018, 8:44 AM

looks fine ...

devilhorns accepted this revision.Jul 9 2018, 8:51 AM
This revision is now accepted and ready to land.Jul 9 2018, 8:51 AM
This revision was automatically updated to reflect the committed changes.