Hi!
Error is in svx/source/sdr/overlay/overlaymanagerbuffered.cxx
386: Window& rWindow = static_cast< Window& >(rmOutputDevice);
387: Cursor* pCursor = rWindow.GetCursor();
Maybe something is with the timing of instructions because there are two lines
which are exactly the same, and there works everything:
240: Window& rWindow = static_cast< Window& >(rmOutputDevice);
241: Cursor* pCursor = rWindow.GetCursor();
So defining rWindow in a wider scope (outside of if(bTargetIsWindow){...} line
238) - and using that same rWindow in subsequent occurrences - seems to solve
the problem, at least it makes it less frequent.
PS.: rWindow is of type Window, which has a member named mpWindowImpl. This is
not present in OutputDevice class which is the base class of Window. What value
will be assigned to mpWindowImpl in rWindow after Window& rWindow =
static_cast< Window& >(rmOutputDevice);
Szabolcs
From b887ce90a1f654a4472425fcefc73af8a52395ee Mon Sep 17 00:00:00 2001
From: Szabolcs Dezsi <[email protected]>
Date: Thu, 8 Mar 2012 19:32:51 +0100
Subject: [PATCH] Fixes crash in Window::GetCursor()
---
svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 1a0016f..eb117f7 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -233,11 +233,11 @@ namespace sdr
// prepare cursor handling
const bool bTargetIsWindow(OUTDEV_WINDOW == rmOutputDevice.GetOutDevType());
bool bCursorWasEnabled(false);
+ Window& rWindow = static_cast< Window& >(rmOutputDevice);
// #i80730# switch off VCL cursor during overlay refresh
if(bTargetIsWindow)
{
- Window& rWindow = static_cast< Window& >(rmOutputDevice);
Cursor* pCursor = rWindow.GetCursor();
if(pCursor && pCursor->IsVisible())
@@ -354,8 +354,6 @@ namespace sdr
// To get the update, the windows in question are updated manulally here.
if(bTargetIsWindow)
{
- Window& rWindow = static_cast< Window& >(rmOutputDevice);
-
if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount())
{
const Rectangle aRegionRectanglePixel(
@@ -383,7 +381,6 @@ namespace sdr
// #i80730# restore visibility of VCL cursor
if(bCursorWasEnabled)
{
- Window& rWindow = static_cast< Window& >(rmOutputDevice);
Cursor* pCursor = rWindow.GetCursor();
if(pCursor)
--
1.7.7
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice