forked from enlightenment/efl
elc_hoversel: Fix crash when no sd->last_location
As we cannot pass NULL to strcmp (crashes when we do), we should check for a valid sd->last_location here in order to avoid crashing. This was detected in Enlightenment Screen Settings dialog by selecting a monitor in the hoversel drop down. @fix
This commit is contained in:
parent
5d512229cb
commit
264f15400f
|
@ -296,7 +296,7 @@ _sizing_eval(void *data)
|
|||
|
||||
if (sd->horizontal)
|
||||
{
|
||||
if (!strcmp(sd->last_location, "left"))
|
||||
if ((sd->last_location) && (!strcmp(sd->last_location, "left")))
|
||||
{
|
||||
adjusted.x = parent.x;
|
||||
if ((adjusted.x + adjusted.w) > base.x)
|
||||
|
@ -314,7 +314,7 @@ _sizing_eval(void *data)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!strcmp(sd->last_location, "top"))
|
||||
if ((sd->last_location) && (!strcmp(sd->last_location, "top")))
|
||||
{
|
||||
adjusted.y = parent.y;
|
||||
if ((adjusted.y + adjusted.h) > base.y)
|
||||
|
|
Loading…
Reference in New Issue