tdf#97700 - vcl: opengl - fix memory corrupting size mis-match.

Change-Id: Iab49a20c85f9deb3e8c60a782050aa4c12b663ad
diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx
index 9ba7432..3f24807 100644
--- a/vcl/opengl/scale.cxx
+++ b/vcl/opengl/scale.cxx
@@ -68,6 +68,8 @@ bool OpenGLSalBitmap::ImplScaleFilter(

    mnWidth = nNewWidth;
    mnHeight = nNewHeight;
    mnBufWidth = mnWidth;
    mnBufHeight = mnHeight;
    maTexture = aNewTex;

    CHECK_GL_ERROR();
@@ -181,6 +183,8 @@ bool OpenGLSalBitmap::ImplScaleConvolution(

    mnWidth = nNewWidth;
    mnHeight = nNewHeight;
    mnBufWidth = mnWidth;
    mnBufHeight = mnHeight;

    CHECK_GL_ERROR();
    return true;
@@ -256,6 +260,8 @@ bool OpenGLSalBitmap::ImplScaleArea( const rtl::Reference< OpenGLContext > &xCon

    mnWidth = nNewWidth;
    mnHeight = nNewHeight;
    mnBufWidth = mnWidth;
    mnBufHeight = mnHeight;

    CHECK_GL_ERROR();
    return true;