Change-Id: I7daa865948ce6e468d21898c1f45f2a9babd4dfa
void flat_navi_context_root_change(FlatNaviContext *ctx, AtspiAccessible *root)
{
+ if (!ctx || !root) {
+ DEBUG("No context or root!");
+ return;
+ }
+
gchar *id = atspi_accessible_get_unique_id(root, NULL);
- DEBUG("START - context root is changed to %s", id);
- g_free(id);
+ if (id) {
+ DEBUG("START - context root is changed to %s", id);
+ g_free(id);
+ }
g_clear_object(&ctx->root);
ctx->root = root ? g_object_ref(root) : NULL;
}