Cc: Yonit Halperin <[email protected]>
---
display/surface.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/display/surface.h b/display/surface.h
index 00fd93c..e677610 100644
--- a/display/surface.h
+++ b/display/surface.h
@@ -41,6 +41,9 @@ static _inline UINT32 GetSurfaceId(SURFOBJ *surf)
{
SurfaceInfo *surface;
+ if (!surf || !surf->dhsurf) {
+ return (UINT32)-1;
+ }
surface = (SurfaceInfo *)surf->dhsurf;
return GetSurfaceIdFromInfo(surface);
}
--
1.7.5.2
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel