Commit 8234562c authored by Christian Hergert's avatar Christian Hergert

core: gracefully handle NULL object instance

parent 14342212
......@@ -1351,9 +1351,14 @@ ide_object_log (gpointer instance,
g_autoptr(IdeObject) root = NULL;
va_list args;
g_assert (IDE_IS_OBJECT (instance));
g_assert (!instance || IDE_IS_OBJECT (instance));
root = ide_object_ref_root (instance);
if G_UNLIKELY (instance == NULL || !(root = ide_object_ref_root (instance)))
{
va_start (args, format);
g_logv (domain, level, format, args);
va_end (args);
}
if (IDE_IS_CONTEXT (root))
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment