From 7a47aebe9ed41d6cd9c9bcd45758d4d553668e99 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 10 Oct 2013 17:06:37 +0200 Subject: Let QLoggingCategory::defaultCategory return a pointer The pointer can be null. Going trough the reference invokes undefined behavior here. Change-Id: Ia84e4e732cdcbbaee0f5f0679765d18069ea8b2d Reviewed-by: Kai Koehne --- src/corelib/io/qloggingcategory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/io/qloggingcategory.h') diff --git a/src/corelib/io/qloggingcategory.h b/src/corelib/io/qloggingcategory.h index 35da04c8f2..6009226127 100644 --- a/src/corelib/io/qloggingcategory.h +++ b/src/corelib/io/qloggingcategory.h @@ -72,7 +72,7 @@ public: // allows usage of both factory method and variable in qCX macros QLoggingCategory &operator()() { return *this; } - static QLoggingCategory &defaultCategory(); + static QLoggingCategory *defaultCategory(); typedef void (*CategoryFilter)(QLoggingCategory*); static CategoryFilter installFilter(CategoryFilter); -- cgit v1.2.3