« Previous | Next » 

Revision 95916abc

ID95916abcf428fb03644468c7fbce64356c6483c0

Added by Peter Crosthwaite almost 11 years ago

qom/object: Don't poll cast cache for NULL objects

object_dynamic_cast_assert used to be tolerant of NULL objects and not
assert. It's clear from the implementation that this is the expected
behavior.

The preceding check of the cast cache dereferences obj however causing
a segfault. Fix by conditionalizing the cast cache logic on obj being
non-null.

Signed-off-by: Peter Crosthwaite <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Anthony Liguori <>
Reviewed-by: Paolo Bonzini <>
Reviewed-by: Edgar E. Iglesias <>
Message-id:
Signed-off-by: Anthony Liguori <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences