Proper fix for array == NULL in WMPopFromArray() function.
authorGabriel VLASIU <gabriel@vlasiu.net>
Sat, 6 Jul 2013 10:06:26 +0000 (6 13:06 +0300)
committerCarlos R. Mafra <crmafra@gmail.com>
Sat, 6 Jul 2013 10:36:50 +0000 (6 11:36 +0100)
WINGs/array.c

index 390df02..0e08342 100644 (file)
@@ -222,7 +222,7 @@ void *WMGetFromArray(WMArray * array, int index)
 
 void *WMPopFromArray(WMArray * array)
 {
-       if (array->itemCount <= 0 || array == NULL)
+       if (array == NULL || array->itemCount <= 0)
                return NULL;
 
        array->itemCount--;