[Scummvm-cvs-logs] SF.net SVN: scummvm:[55456] scummvm/trunk/graphics/video/coktel_decoder.cpp

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sun Jan 23 04:46:38 CET 2011


Revision: 55456
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55456&view=rev
Author:   drmccoy
Date:     2011-01-23 03:46:38 +0000 (Sun, 23 Jan 2011)

Log Message:
-----------
VIDEO: Fix createSurface() for the case that there's no video

Fixes clicking on the Piano in the Apartment in Urban Runner.

Modified Paths:
--------------
    scummvm/trunk/graphics/video/coktel_decoder.cpp

Modified: scummvm/trunk/graphics/video/coktel_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.cpp	2011-01-23 01:27:40 UTC (rev 55455)
+++ scummvm/trunk/graphics/video/coktel_decoder.cpp	2011-01-23 03:46:38 UTC (rev 55456)
@@ -83,6 +83,9 @@
 void CoktelDecoder::setSurfaceMemory(void *mem, uint16 width, uint16 height, uint8 bpp) {
 	freeSurface();
 
+	if (!hasVideo())
+		return;
+
 	// Sanity checks
 	assert((width > 0) && (height > 0));
 	assert(bpp == getPixelFormat().bytesPerPixel);
@@ -119,6 +122,9 @@
 	if (hasSurface())
 		return;
 
+	if (!hasVideo())
+		return;
+
 	if ((_width > 0) && (_height > 0))
 		_surface.create(_width, _height, getPixelFormat().bytesPerPixel);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list