Author: adrian
Date: Sat Jan 30 08:09:49 2010
New Revision: 8427

URL: http://svn.slimdevices.com/jive?rev=8427&view=rev
Log:
Bug: N/A
Description: can be called with h or w set to NULL - avoid crashing in the 
error condition by dereferencing

Modified:
    7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_surface.c

Modified: 7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_surface.c
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_surface.c?rev=8427&r1=8426&r2=8427&view=diff
==============================================================================
--- 7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_surface.c (original)
+++ 7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_surface.c Sat Jan 30 
08:09:49 2010
@@ -530,8 +530,10 @@
 void jive_surface_get_size(JiveSurface *srf, Uint16 *w, Uint16 *h) {
        if (!srf->sdl) {
                LOG_ERROR(log_ui, "Underlying sdl surface already freed, 
possibly with release()");
-               *w = 0;
-               *h = 0;
+               if (w)
+                       *w = 0;
+               if (h)
+                       *h = 0;
                return;
        }
        if (w) {

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins

Reply via email to