d3d1x: assert if X visual is not among enumerated visuals
authorLuca Barbieri <luca@luca-barbieri.com>
Fri, 24 Sep 2010 12:52:13 +0000 (14:52 +0200)
committerLuca Barbieri <luca@luca-barbieri.com>
Fri, 24 Sep 2010 13:12:19 +0000 (15:12 +0200)
src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp

index ef256a80c79c50225ad15d6061cda90cbe2f4b97..a75a953abfb1e7424437562788a96578bc9486bc 100644 (file)
@@ -902,6 +902,7 @@ struct GalliumDXGISwapChain : public GalliumDXGIObject<IDXGISwapChain, GalliumDX
                {
                        XWindowAttributes xwa;
                        XGetWindowAttributes((Display*)parent->display, (Window)window, &xwa);
+                       assert(adapter->configs_by_native_visual_id.count(xwa.visual->visualid));
                        config_num = adapter->configs_by_native_visual_id[xwa.visual->visualid];
                }
                else