[Libreoffice-commits] core.git: vcl/unx
Chris Sherlock
chris.sherlock79 at gmail.com
Fri Feb 14 10:07:04 CET 2014
vcl/unx/gtk/window/gtksalframe.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 64fe9c6fd5888a7eeed34a20787d2d61da02378f
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Fri Feb 14 01:45:32 2014 +1100
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 38ea023..3fb2eb5 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;
}
More information about the Libreoffice-commits
mailing list