mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Only use g_memdup2 for glib >= 2.68
This commit is contained in:
parent
cb49650ea4
commit
4f76c9bd43
@ -287,7 +287,11 @@ Glib::RefPtr<Gdk::Pixbuf> Item::extractPixBuf(GVariant* variant) {
|
||||
if (array != nullptr) {
|
||||
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));
|
||||
#endif
|
||||
lwidth = width;
|
||||
lheight = height;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user