e window list: prevent from segfaulting, patch from andrej.

Description from Trac (see #1020):

Pressing a key which is bound to "next/previous window of the same class" can make Enlightenment SEGV. This happens when:

    Window switcher list module is loaded
    the key is pressed when the active desktop is empty (i.e., contains no windows / applications) and at least one other desktop contains one or several windows 

This does not happen if all the desktops are empty.

 Fixes #1020.


SVN revision: 72753
This commit is contained in:
Chidambar Zinnoury 2012-06-24 05:35:49 +00:00
parent b2fec5b8dc
commit fe0672f783
1 changed files with 5 additions and 3 deletions

View File

@ -180,10 +180,12 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
switch (filter)
{
case E_WINLIST_FILTER_CLASS_WINDOWS:
if (!_last_border)
pick = EINA_FALSE;
else
pick = !strcmp(_last_border->client.icccm.class,
bd->client.icccm.class);
break;
case E_WINLIST_FILTER_CLASSES:
pick = (!_wmclass_picked(wmclasses, bd->client.icccm.class));
if (pick)