Commit 179daf67 authored by Sergio Gómez Del Real's avatar Sergio Gómez Del Real Committed by Alexandre Julliard

ole32: Correctly save the dib format if its data has not been set.

parent dfb09f48
...@@ -792,8 +792,14 @@ static void init_stream_header(DataCacheEntry *entry, PresentationDataHeader *he ...@@ -792,8 +792,14 @@ static void init_stream_header(DataCacheEntry *entry, PresentationDataHeader *he
static HRESULT save_dib(DataCacheEntry *entry, BOOL contents, IStream *stream) static HRESULT save_dib(DataCacheEntry *entry, BOOL contents, IStream *stream)
{ {
HRESULT hr = S_OK; HRESULT hr = S_OK;
int data_size = GlobalSize(entry->stgmedium.u.hGlobal); int data_size = 0;
BITMAPINFO *bmi = GlobalLock(entry->stgmedium.u.hGlobal); BITMAPINFO *bmi = NULL;
if (entry->stgmedium.tymed != TYMED_NULL)
{
data_size = GlobalSize(entry->stgmedium.u.hGlobal);
bmi = GlobalLock(entry->stgmedium.u.hGlobal);
}
if (!contents) if (!contents)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment