From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9jnm-0007RM-Ku for qemu-devel@nongnu.org; Fri, 30 Sep 2011 16:35:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9jnj-0008Bo-68 for qemu-devel@nongnu.org; Fri, 30 Sep 2011 16:35:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9jni-0008BR-Mp for qemu-devel@nongnu.org; Fri, 30 Sep 2011 16:35:19 -0400 From: Luiz Capitulino Date: Fri, 30 Sep 2011 17:34:26 -0300 Message-Id: <1317414891-4042-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1317414891-4042-1-git-send-email-lcapitulino@redhat.com> References: <1317414891-4042-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 01/26] error: let error_is_type take a NULL error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, mdroth@linux.vnet.ibm.com, armbru@redhat.com From: Anthony Liguori Reported-by: Luiz Capitulino Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- error.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/error.c b/error.c index b802752..68c0039 100644 --- a/error.c +++ b/error.c @@ -97,6 +97,10 @@ bool error_is_type(Error *err, const char *fmt) char *ptr; char *end; + if (!err) { + return false; + } + ptr = strstr(fmt, "'class': '"); assert(ptr != NULL); ptr += strlen("'class': '"); -- 1.7.7.rc0.72.g4b5ea