handle 0 name length.

SVN revision: 83834
This commit is contained in:
Carsten Haitzler 2013-02-12 03:37:19 +00:00
parent b936d5287e
commit 6ba07f8dca
1 changed files with 2 additions and 1 deletions

View File

@ -380,7 +380,8 @@ _12_policies_restore(void)
{
EINA_LIST_FOREACH(e_config->randr_serialized_setup->outputs_policies, iter2, sop)
{
if (!strncmp(sop->name, output->name, output->name_length))
if ((output->name_length > 0) &&
(!strncmp(sop->name, output->name, output->name_length)))
{
output->policy = sop->policy;
INF("E_RANDR: Policy \"%s\" for output \"%s\" restored.", _POLICIES_STRINGS[sop->policy - 1], output->name);