'everything'

fix segv when browsed dir has no files
make evry_conf and evry_hist EAPI for now


SVN revision: 42846
This commit is contained in:
Hannes Janetzek 2009-10-01 22:31:45 +00:00
parent cf7cfc3b58
commit 25eefb779a
2 changed files with 7 additions and 7 deletions

View File

@ -154,8 +154,8 @@ int evry_history_item_usage_set(Eina_Hash *hist, Evry_Item *it, const char *inp
EAPI int evry_browse_item(Evry_Selector *sel);
void evry_browse_back(Evry_Selector *sel);
extern Config *evry_conf;
extern History *evry_hist;
EAPI extern Config *evry_conf;
EAPI extern History *evry_hist;
extern Evry_Selector **selectors;
extern Evry_Plugin *action_selector;
#endif

View File

@ -107,6 +107,9 @@ _fetch(Evry_Plugin *plugin, const char *input)
s = p->selector->state;
if (!s || !s->cur_plugins || !s->cur_plugins->next)
return 0;
for (i = 1; i < 3; i++)
{
Evry_Item *item;
@ -116,8 +119,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
context = item->context;
}
}
/* first is aggregator itself */
lp = s->cur_plugins->next;
@ -176,9 +178,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
}
}
/* NOTE this is kind of weird. list_count returns 2 even if there is
only one item in list */
if ((eina_list_count(lp) == 2) || (!EVRY_PLUGIN(p)->items))
if (lp && (eina_list_count(lp) == 2) || (!EVRY_PLUGIN(p)->items))
{
pp = lp->data;
EINA_LIST_FOREACH(pp->items, l, it)