evas: prepare for cur beeing NULL

debug name could be called during any time, even before the constructor,
of this super class is hit. So cur can be NULL here.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11659
This commit is contained in:
Marcel Hollerbach 2020-04-06 16:16:30 +02:00
parent fd853894e5
commit 6ba5773ca5
1 changed files with 5 additions and 1 deletions

View File

@ -74,7 +74,11 @@ _efl_canvas_object_efl_object_debug_name_override(Eo *eo_obj, Evas_Object_Protec
const char *clip = obj->clip.clipees ? ":clipper" : "";
efl_debug_name_override(efl_super(eo_obj, EFL_CANVAS_OBJECT_CLASS), sb);
if (obj->cur->visible)
if (!obj->cur)
{
eina_strbuf_append_printf(sb, ":nostate");
}
else if (obj->cur->visible)
{
eina_strbuf_append_printf(sb, "%s%s:(%d,%d %dx%d)", norend, clip,
obj->cur->geometry.x, obj->cur->geometry.y,