Skip to content
Snippets Groups Projects
Commit df7b8366 authored by Timur Pocheptsov's avatar Timur Pocheptsov
Browse files

Do not create a pixmap if a context creation failed.

parent 9282b12b
No related branches found
No related tags found
No related merge requests found
......@@ -150,7 +150,7 @@ static bool CreateSplashscreenWindow()
const int screen = DefaultScreen(gDisplay);
gBackground = WhitePixel(gDisplay, screen);
Pixel foreground = BlackPixel(gDisplay, screen);
const Pixel foreground = BlackPixel(gDisplay, screen);
gLogoWindow = XCreateSimpleWindow(gDisplay, DefaultRootWindow(gDisplay),
-100, -100, 50, 50, 0,
......@@ -172,8 +172,7 @@ static void SetSplashscreenPosition()
&gWidth, &gHeight, &borderWidth, &depth);
//TODO: this is wrong with multi-head display setup!
Screen * const screen = XDefaultScreenOfDisplay(gDisplay);
if (screen) {
if (Screen * const screen = XDefaultScreenOfDisplay(gDisplay)) {
x = (WidthOfScreen(screen) - gWidth) / 2;
y = (HeightOfScreen(screen) - gHeight) / 2;
} else {
......@@ -337,7 +336,6 @@ static bool GetRootLogoAndShapeMask()
gHasShapeExt = false;
int eventBase = 0, errorBase = 0;
gHasShapeExt = XShapeQueryExtension(gDisplay, &eventBase, &errorBase);
gLogoPixmap = 0;
......@@ -613,8 +611,9 @@ void PopupLogo(bool about)
if (gAbout)
ReadContributors();
if (gGC)
CreateTextPixmap();
CreateTextPixmap();
if (gCreditsPixmap)
ScrollCredits(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment