- Timestamp:
- May 27, 2019 7:11:12 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getpixelmap.cpp
r78375 r78794 15 15 static GLint __sizeQuery( GLenum map ) 16 16 { 17 GLint get_values ;17 GLint get_values = 0; 18 18 /* Windows compiler gets mad if variables might be uninitialized */ 19 19 GLenum newmap = GL_PIXEL_MAP_I_TO_I_SIZE; … … 80 80 81 81 size *= tabsize; 82 local_values = (GLfloat*)crCalloc( size ); 82 if (size) 83 { 84 local_values = (GLfloat*)crCalloc( size ); 83 85 84 cr_server.head_spu->dispatch_table.GetPixelMapfv( map, local_values ); 85 crServerReturnValue( local_values, size ); 86 crFree( local_values ); 86 cr_server.head_spu->dispatch_table.GetPixelMapfv( map, local_values ); 87 crServerReturnValue( local_values, size ); 88 crFree( local_values ); 89 } 90 else 91 { 92 crError("crServerDispatchGetPixelMapfv: __sizeQuery() returned 0"); 93 crServerReturnValue(NULL, 0); 94 } 87 95 } 88 96 } … … 107 115 108 116 size *= tabsize; 109 local_values = (GLuint*)crCalloc( size ); 117 if (size) 118 { 119 local_values = (GLuint*)crCalloc( size ); 110 120 111 cr_server.head_spu->dispatch_table.GetPixelMapuiv( map, local_values ); 112 crServerReturnValue( local_values, size ); 113 crFree( local_values ); 121 cr_server.head_spu->dispatch_table.GetPixelMapuiv( map, local_values ); 122 crServerReturnValue( local_values, size ); 123 crFree( local_values ); 124 } 125 else 126 { 127 crError( "crServerDispatchGetPixelMapuiv: __sizeQuery() returned 0"); 128 crServerReturnValue(NULL, 0); 129 } 114 130 } 115 131 } … … 134 150 135 151 size *= tabsize; 136 local_values = (GLushort*)crCalloc( size ); 152 if (size) 153 { 154 local_values = (GLushort*)crCalloc( size ); 137 155 138 cr_server.head_spu->dispatch_table.GetPixelMapusv( map, local_values ); 139 crServerReturnValue( local_values, size ); 140 crFree( local_values ); 156 cr_server.head_spu->dispatch_table.GetPixelMapusv( map, local_values ); 157 crServerReturnValue( local_values, size ); 158 crFree( local_values ); 159 } 160 else 161 { 162 crError( "crServerDispatchGetPixelMapuiv: __sizeQuery() returned 0"); 163 crServerReturnValue(NULL, 0); 164 } 141 165 } 142 166 }
Note:
See TracChangeset
for help on using the changeset viewer.