Kaydet (Commit) 3cb4aa94 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: rhbz#1050162 don't draw to NULL window

Change-Id: Ia84e3ae05f2d3eacfb48136ce920173b46783bc7
üst 91b2be94
...@@ -782,7 +782,6 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, ...@@ -782,7 +782,6 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType,
const ImplControlValue& aValue, const ImplControlValue& aValue,
const OUString& rCaption ) const OUString& rCaption )
{ {
sal_Bool returnVal = sal_False;
// get a GC with current clipping region set // get a GC with current clipping region set
GetFontGC(); GetFontGC();
...@@ -839,6 +838,11 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, ...@@ -839,6 +838,11 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType,
} }
} }
assert(gdkDrawable); //rhbz#1050162
if (gdkDrawable == 0)
return false;
sal_Bool returnVal = sal_False;
if ( (nType==CTRL_PUSHBUTTON) && (nPart==PART_ENTIRE_CONTROL) ) if ( (nType==CTRL_PUSHBUTTON) && (nPart==PART_ENTIRE_CONTROL) )
{ {
returnVal = NWPaintGTKButton( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption ); returnVal = NWPaintGTKButton( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment