mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Guard null pointer use
This commit is contained in:
parent
48c6517305
commit
d3a1c80edf
@ -354,11 +354,12 @@ bool RiuMainWindowBase::isBlockingViewSelectionOnSubWindowActivated() const
|
|||||||
void RiuMainWindowBase::removeViewerFromMdiArea( RiuMdiArea* mdiArea, QWidget* viewer )
|
void RiuMainWindowBase::removeViewerFromMdiArea( RiuMdiArea* mdiArea, QWidget* viewer )
|
||||||
{
|
{
|
||||||
bool removedSubWindowWasActive = false;
|
bool removedSubWindowWasActive = false;
|
||||||
|
bool wasMaximized = true;
|
||||||
|
|
||||||
QMdiSubWindow* subWindowBeingClosed = findMdiSubWindow( viewer );
|
if ( QMdiSubWindow* subWindowBeingClosed = findMdiSubWindow( viewer ) )
|
||||||
bool wasMaximized = subWindowBeingClosed->isMaximized();
|
|
||||||
if ( subWindowBeingClosed )
|
|
||||||
{
|
{
|
||||||
|
wasMaximized = subWindowBeingClosed->isMaximized();
|
||||||
|
|
||||||
if ( subWindowBeingClosed->isActiveWindow() )
|
if ( subWindowBeingClosed->isActiveWindow() )
|
||||||
{
|
{
|
||||||
// If we are removing the active window, we will need a new active window
|
// If we are removing the active window, we will need a new active window
|
||||||
|
Loading…
Reference in New Issue
Block a user