Nikolay Sivov (@nsivov) commented about dlls/d2d1/tests/d2d1.c:
ID2D1Bitmap_Release(bitmap2); ID2D1RenderTarget_Release(rt2);
- /* Software rendered render target for IWICBitmapLock */
- desc.type = D2D1_RENDER_TARGET_TYPE_SOFTWARE;
- hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, surface2, &desc, &rt2);
- ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
- hr = IWICBitmap_Lock(wic_bitmap1, NULL, WICBitmapLockRead, &wic_lock);
- ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
- hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IWICBitmapLock, wic_bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#lx.\n", hr);
- IWICBitmapLock_Release(wic_lock);
- ID2D1Bitmap_Release(bitmap2);
The 'bitmap2' pointer is not valid I think.