Fix QCFType::constructFromGet() crash when passed a nullptr
Change-Id: I83cbbb47af8580fa67cbc75fee07bc1e123895eb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
515b905150
commit
7b1a3ba027
@ -111,6 +111,7 @@ public:
|
||||
template <typename X> X as() const { return reinterpret_cast<X>(type); }
|
||||
static QCFType constructFromGet(const T &t)
|
||||
{
|
||||
if (t)
|
||||
CFRetain(t);
|
||||
return QCFType<T>(t);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user