Page MenuHomePhabricator

elementary: Avoid passing NULL in some win focus methods

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



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

rEFL core/efl
No Linters Available
No Unit Test Coverage
Build Status
Buildable 6802
Build 6811: arc lint + arc unit
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.