Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.7.0
-
None
Description
If an object of subclassed QOpenGLWidget is created but never show e.g. using of two tabs in QTabWidget and adding a subclassed QOpenGLWidget object to a hidden tab results in never generated resizeEvent of this object. By closing the application the destructor of the QOpenGLWidget is called which involves the calling of reset() method of the private QOpenGLWidget class (QOpenGLWidgetPrivate). Inside the reset() method the paintDevice object is deleted without any check for existence, but if the initialize() method was never called before, which is the case if resizeEvent is not occurred, the paintDevice object was never constructed and the pointer is zero.
I think some check for zero pointer of paintDevice inside of the reset() method is necessary.