Qian Hong : riched20: Handle QI failure in ME_GetOLEObjectSize.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Sep 2 14:30:37 CDT 2014
Module: wine
Branch: master
Commit: 3881adf2440b98fe70dda0556ce1df610cf57742
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3881adf2440b98fe70dda0556ce1df610cf57742
Author: Qian Hong <qhong at codeweavers.com>
Date: Mon Sep 1 10:00:59 2014 +0800
riched20: Handle QI failure in ME_GetOLEObjectSize.
---
dlls/riched20/richole.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 487fcda..b18b648 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -1586,7 +1586,12 @@ void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize)
return;
}
- IOleObject_QueryInterface(run->ole_obj->poleobj, &IID_IDataObject, (void**)&ido);
+ if (IOleObject_QueryInterface(run->ole_obj->poleobj, &IID_IDataObject, (void**)&ido) != S_OK)
+ {
+ FIXME("Query Interface IID_IDataObject failed!\n");
+ pSize->cx = pSize->cy = 0;
+ return;
+ }
fmt.cfFormat = CF_BITMAP;
fmt.ptd = NULL;
fmt.dwAspect = DVASPECT_CONTENT;
More information about the wine-cvs
mailing list