Fixed a potential crash when loading the configuration

This commit is contained in:
Pierre Pronchery 2010-08-29 01:04:10 +00:00
parent d79310ccc4
commit 1c1e01a973

View File

@ -229,7 +229,7 @@ static gboolean _new_idle(gpointer data)
fprintf(stderr, "DEBUG: %s() background=\"%s\"\n", __func__, p);
#endif
if((p = config_get(config, NULL, "background_how")) != NULL)
for(i = 0; _desktop_hows[i] != NULL; i++)
for(i = 0; i < DESKTOP_HOW_COUNT; i++)
if(strcmp(_desktop_hows[i], p) == 0)
how = i;
switch(how)