From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzXe0-0000GV-J9 for qemu-devel@nongnu.org; Fri, 02 Sep 2011 13:35:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QzXdz-0001xX-Df for qemu-devel@nongnu.org; Fri, 02 Sep 2011 13:35:08 -0400 Received: from cpe-70-123-132-139.austin.res.rr.com ([70.123.132.139]:35466 helo=localhost6.localdomain6) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzXdz-0001xL-85 for qemu-devel@nongnu.org; Fri, 02 Sep 2011 13:35:07 -0400 From: Anthony Liguori Date: Fri, 2 Sep 2011 12:34:44 -0500 Message-Id: <1314984898-19141-2-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1314984898-19141-1-git-send-email-aliguori@us.ibm.com> References: <1314984898-19141-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 01/15] 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: Kevin Wolf , Anthony Liguori , Michael Roth , Luiz Capitulino Reported-by: Luiz Capitulino Signed-off-by: Anthony Liguori --- 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.4.1