Index: gstdirectdrawsink.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/sys/directdraw/gstdirectdrawsink.c,v
retrieving revision 1.28
diff -u -r1.28 gstdirectdrawsink.c
--- gstdirectdrawsink.c	7 May 2008 15:33:52 -0000	1.28
+++ gstdirectdrawsink.c	7 Jul 2008 21:30:46 -0000
@@ -889,10 +889,13 @@
 
     /* Write each line respecting the destination surface pitch */
     data = surf_desc.lpSurface;
-    src_pitch = GST_BUFFER_SIZE (buf) / ddrawsink->video_height;
-    for (line = 0; line < surf_desc.dwHeight; line++) {
-      memcpy (data, GST_BUFFER_DATA (buf) + (line * src_pitch), src_pitch);
-      data += surf_desc.lPitch;
+    if (ddrawsink->video_height)
+    {
+        src_pitch = GST_BUFFER_SIZE (buf) / ddrawsink->video_height;
+        for (line = 0; line < surf_desc.dwHeight; line++) {
+          memcpy (data, GST_BUFFER_DATA (buf) + (line * src_pitch), src_pitch);
+          data += surf_desc.lPitch;
+        }
     }
 
     /* Unlock the surface */

