mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-01 08:38:00 -06:00
Fix crashes reported by crash telemetry
* Recompute well cell arrays when the grids change computeWellCellsPrGrid() returned early whenever the arrays had been computed once, so the size check below it was unreachable and a stale array was kept when the grids changed. The too-short array triggered an assert in RivReservoirViewPartMgr::computeNativeVisibility. Return early only when the cached arrays still match the current set of grids. * Guard against missing GUI application when applying style sheet RiaGuiApplication::instance() does a dynamic_cast and returns null outside a GUI context. The assert guarding this is compiled out in release, so the null pointer was dereferenced. * Guard against missing case in flow characteristics plot field change The case field can be set to nothing from the UI. RimEclipseResultCase::defaultFlowDiagSolution() and reservoirViews() were then called on a null pointer. * Guard against missing case and out of range time steps when updating flow characteristics plot onLoadDataAndUpdate() dereferenced the case without checking, although the same function handles a missing case further down. The time step indices come from the flow diagnostics solution, and were used to index arrays sized by the number of case time steps without a range check.
This commit is contained in:
1 parent
ebf75c09a1
commit
318659e130
5 files changed
+70
-12
No files matched your search
@@ -381,10 +381,13 @@ bool RiuGuiTheme::applyStyleSheet( RiaDefines::ThemeEnum theme )
|
||||
{
|
||||
if ( styleSheetFile.open( QIODevice::ReadOnly ) )
|
||||
{
|
||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||
QString styleSheet = styleSheetFile.readAll();
|
||||
QString styleSheet = styleSheetFile.readAll();
|
||||
preparseStyleSheet( theme, styleSheet );
|
||||
app->setStyleSheet( styleSheet );
|
||||
|
||||
if ( RiaGuiApplication* app = RiaGuiApplication::instance() )
|
||||
{
|
||||
app->setStyleSheet( styleSheet );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user