[Title] Return variable null pointer bug fix.
authorsangjin3.kim <sangjin3.kim@samsung.com>
Thu, 22 Mar 2012 08:17:58 +0000 (17:17 +0900)
committersangjin3.kim <sangjin3.kim@samsung.com>
Thu, 22 Mar 2012 08:17:58 +0000 (17:17 +0900)
[Type] bug fix.
[Module] opengl-es
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/hw/helper_opengl.c

index 181ce88203bcc6d16a6652e3a49ae82c0a965510..c5cd4fa313e211a5c092f7d71a059d1b408222dd 100755 (executable)
@@ -132,11 +132,13 @@ static inline int do_decode_call_int(ProcessStruct *process, void *args_in, int
 
                 CASE_OUT_POINTERS:
                 {
-                    /* It seems that we never experience NULL out pointers!!! */
-                    if (args_size == 0 && func_number != 4) // FIXMEIM - hack for now
-                        return 0;
-
-                    if(*(int*)argptr) {
+                                       /* NULL pointer is used as output pointer
+                                          since the argument size is zero. */
+                                       if (args_size == 0) {
+                                               *(int*)r_buffer = 0;
+                                               r_buffer += 4;
+                                               args[i] = NULL;
+                                       } else if(*(int*)argptr) {
                         *(int*)r_buffer = args_size;
                         r_buffer+=4;
                         args[i] = (host_ptr)r_buffer;