mirror of
https://github.com/opencv/opencv.git
synced 2025-06-13 04:52:53 +08:00
gtk: check NULL before unref
This commit is contained in:
parent
324851882a
commit
aa75b6067c
@ -951,7 +951,8 @@ static gboolean cvImageWidget_draw(GtkWidget* widget, cairo_t *cr, gpointer data
|
|||||||
}
|
}
|
||||||
|
|
||||||
cairo_paint(cr);
|
cairo_paint(cr);
|
||||||
g_object_unref(pixbuf);
|
if(pixbuf)
|
||||||
|
g_object_unref(pixbuf);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1005,7 +1006,8 @@ static gboolean cvImageWidget_expose(GtkWidget* widget, GdkEventExpose* event, g
|
|||||||
}
|
}
|
||||||
|
|
||||||
cairo_paint(cr);
|
cairo_paint(cr);
|
||||||
g_object_unref(pixbuf);
|
if(pixbuf)
|
||||||
|
g_object_unref(pixbuf);
|
||||||
cairo_destroy(cr);
|
cairo_destroy(cr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user