Fix access to uninitialized pointer
The C++ standard says in 9.4..2 that the object expression is evaluated, so any compliant compiler may access d. So this syntax is a bug in this place. Change-Id: I37d2c4ea54febd40410ca473c906bcb1c66c4974 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>bb10
parent
958aaf3770
commit
88cf9402e3
|
|
@ -512,7 +512,7 @@ public:
|
|||
// special constructor that is enabled only if X derives from QObject
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
template <class X>
|
||||
QT_DEPRECATED inline QWeakPointer(X *ptr) : d(ptr ? d->getAndRef(ptr) : 0), value(ptr)
|
||||
QT_DEPRECATED inline QWeakPointer(X *ptr) : d(ptr ? Data::getAndRef(ptr) : 0), value(ptr)
|
||||
{ }
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue