allow freeing NULL pixmap masks
This commit is contained in:
parent
c2bb32dcd1
commit
2d9c03a441
1 changed files with 5 additions and 3 deletions
|
@ -14,10 +14,12 @@ pixmap_mask *pixmap_mask_new(int w, int h, char *data)
|
|||
|
||||
void pixmap_mask_free(pixmap_mask *m)
|
||||
{
|
||||
if (m) {
|
||||
XFreePixmap(ob_display, m->mask);
|
||||
g_free(m->data);
|
||||
g_free(m);
|
||||
}
|
||||
}
|
||||
|
||||
void mask_draw(Pixmap p, TextureMask *m, Rect *position)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue