Revision: 8818
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8818&view=rev
Author:   jpgr87
Date:     2010-07-08 02:56:35 +0000 (Thu, 08 Jul 2010)

Log Message:
-----------
Fixed bug #3006544: Driver Mapfile load the image incorrectly

Modified Paths:
--------------
    code/player/trunk/server/drivers/map/mapfile.cc

Modified: code/player/trunk/server/drivers/map/mapfile.cc
===================================================================
--- code/player/trunk/server/drivers/map/mapfile.cc     2010-07-08 02:35:16 UTC 
(rev 8817)
+++ code/player/trunk/server/drivers/map/mapfile.cc     2010-07-08 02:56:35 UTC 
(rev 8818)
@@ -231,14 +231,13 @@
   this->size_x = gdk_pixbuf_get_width(pixbuf);
   this->size_y = gdk_pixbuf_get_height(pixbuf);
 
-  assert(this->mapdata = (char*)malloc(sizeof(char) *
-                                       this->size_x * this->size_y));
+  this->mapdata = (char*)malloc(sizeof(char) *
+                                       this->size_x * this->size_y);
+  assert(this->mapdata);
 
   rowstride = gdk_pixbuf_get_rowstride(pixbuf);
   bps = gdk_pixbuf_get_bits_per_sample(pixbuf)/8;
   n_channels = gdk_pixbuf_get_n_channels(pixbuf);
-  if(gdk_pixbuf_get_has_alpha(pixbuf))
-    n_channels++;
 
   // Read data
   pixels = gdk_pixbuf_get_pixels(pixbuf);


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

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to