diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-02-14 01:45:32 +1100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-14 09:06:38 +0000 |
commit | 64fe9c6fd5888a7eeed34a20787d2d61da02378f (patch) | |
tree | 58b1d2dfc79c61e501230f39d8f0109fc13c24c9 /vcl/unx | |
parent | Include glew.h on OS X for the debug_output stuff (diff) | |
download | core-64fe9c6fd5888a7eeed34a20787d2d61da02378f.tar.gz core-64fe9c6fd5888a7eeed34a20787d2d61da02378f.zip |
fdo#74931 Prevent UpdateSettings from dereferencing null pointer
When calling on GtkSalFrame::GetGraphics(), if all graphics are in
use then it will return NULL. We don't currently check for this,
but we still try to use the graphics object even if none are
available.
I have added a warning when this occurs and just return immediately,
as there's nothing more we can do.
Change-Id: I24dfbb6f37f41527078a60a7577cb3b20de3fcca
Reviewed-on: https://gerrit.libreoffice.org/8031
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 38ea02318e32..3fb2eb55624f 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -2888,6 +2888,11 @@ void GtkSalFrame::UpdateSettings( AllSettings& rSettings ) if( ! pGraphics ) { pGraphics = static_cast<GtkSalGraphics*>(GetGraphics()); + if ( !pGraphics ) + { + SAL_WARN("vcl", "Could not get graphics - unable to update settings"); + return; + } bFreeGraphics = true; } |