mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-11-04 09:42:42 +01:00 
			
		
		
		
	Merge pull request #1222 from mswiger/use_g_memdup2
Use g_memdup2 instead of g_memdup
This commit is contained in:
		@@ -287,7 +287,11 @@ Glib::RefPtr<Gdk::Pixbuf> Item::extractPixBuf(GVariant* variant) {
 | 
				
			|||||||
          if (array != nullptr) {
 | 
					          if (array != nullptr) {
 | 
				
			||||||
            g_free(array);
 | 
					            g_free(array);
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					#if GLIB_MAJOR_VERSION >= 2 && GLIB_MINOR_VERSION >= 68
 | 
				
			||||||
 | 
					          array = static_cast<guchar*>(g_memdup2(data, size));
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
          array = static_cast<guchar*>(g_memdup(data, size));
 | 
					          array = static_cast<guchar*>(g_memdup(data, size));
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
          lwidth = width;
 | 
					          lwidth = width;
 | 
				
			||||||
          lheight = height;
 | 
					          lheight = height;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user