diff --git a/src/Cockpit/built_in/FGMagRibbon.cxx b/src/Cockpit/built_in/FGMagRibbon.cxx index 7f0b64342..9aa7632a3 100644 --- a/src/Cockpit/built_in/FGMagRibbon.cxx +++ b/src/Cockpit/built_in/FGMagRibbon.cxx @@ -65,8 +65,8 @@ FGMagRibbon::draw () // Adjust to put the number in the centre xoffset -= 0.25; - FGCroppedTexture t = getTexture(); - t.setCrop(xoffset, yoffset, xoffset + 0.5, yoffset + 0.25); + FGCroppedTexture *t = getTexture(); + t->setCrop(xoffset, yoffset, xoffset + 0.5, yoffset + 0.25); glPushAttrib(GL_DEPTH_BUFFER_BIT); glEnable(GL_DEPTH_TEST); diff --git a/src/Cockpit/panel.hxx b/src/Cockpit/panel.hxx index f4dbd7eb2..9c110d072 100644 --- a/src/Cockpit/panel.hxx +++ b/src/Cockpit/panel.hxx @@ -491,6 +491,7 @@ public: _texture = texture; } virtual const FGCroppedTexture &getTexture () const { return _texture; } + virtual FGCroppedTexture *getTexture() { return &_texture; } private: FGCroppedTexture _texture;