diff options
Diffstat (limited to 'src/gui/widgets/tab.cpp')
-rw-r--r-- | src/gui/widgets/tab.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index 99a69897d..ac91442fb 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -218,25 +218,28 @@ void Tab::draw(gcn::Graphics *graphics) Graphics *const g = static_cast<Graphics*>(graphics); - // draw tab - if (openGLMode != 2) + if (skin) { - const ImageRect &rect = skin->getBorder(); - if (mRedraw || mode != mMode || g->getRedraw()) + // draw tab + if (openGLMode != 2) { - mMode = mode; - mRedraw = false; - mVertexes->clear(); - g->calcWindow(mVertexes, 0, 0, - mDimension.width, mDimension.height, rect); - } + const ImageRect &rect = skin->getBorder(); + if (mRedraw || mode != mMode || g->getRedraw()) + { + mMode = mode; + mRedraw = false; + mVertexes->clear(); + g->calcWindow(mVertexes, 0, 0, + mDimension.width, mDimension.height, rect); + } - g->drawTile(mVertexes); - } - else - { - g->drawImageRect(0, 0, - mDimension.width, mDimension.height, skin->getBorder()); + g->drawTile(mVertexes); + } + else + { + g->drawImageRect(0, 0, + mDimension.width, mDimension.height, skin->getBorder()); + } } if (mImage) |