=== modified file 'src/composite-canvas.cc'
@@ -220,7 +220,7 @@
vis_info->visual, mask, &attr);
/* set hints and properties */
- {
+ if (win) {
XSizeHints sizehints;
sizehints.x = x;
sizehints.y = y;
@@ -231,6 +231,9 @@
XSetStandardProperties(xdpy_, win, name, name,
None, NULL, 0, &sizehints);
}
+ else {
+ Log::error("XCreateWindow() failed\n");
+ }
return win;
}
@@ -538,8 +541,10 @@
{
/* Open the display */
xdpy_ = XOpenDisplay(NULL);
- if (!xdpy_)
+ if (!xdpy_) {
+ Log::error("Error connecting to X Server. XOpenDisplay() failed.\n");
return false;
+ }
root_ = RootWindow(xdpy_, DefaultScreen(xdpy_));
=== modified file 'src/glcompbench.cc'
@@ -202,8 +202,16 @@
if (test_canvas != canvas && test_canvas != 0) {
if (canvas)
canvas->deinit();
+
+ if (!test_canvas->init()) {
+ Log::error("Cannot initialize canvas of type '%s'. "
+ "Skipping benchmark based on test '%s'.\n",
+ test_canvas->type().c_str(),
+ benchmark->get_test().name().c_str());
+ continue;
+ }
+
canvas = test_canvas;
- canvas->init();
Log::info("=======================================================\n");
Log::info("%s", canvas->info_string().c_str());
Log::info("=======================================================\n");