diff options
author | 2009-09-06 16:15:41 +0200 | |
---|---|---|
committer | 2009-09-06 16:15:41 +0200 | |
commit | 0eb27da8f4f33b99b5574d3eb1094e0ee6515c7c (patch) | |
tree | cf08db5cf5b73246201de2910a205b4ec19bccba /gtkplaylist.c | |
parent | 8b8a091fa4bdb74e78676410e6809b1d525056c7 (diff) |
fixed gtk warnings on search_refresh
Diffstat (limited to 'gtkplaylist.c')
-rw-r--r-- | gtkplaylist.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtkplaylist.c b/gtkplaylist.c index 0e14435f..5efafab6 100644 --- a/gtkplaylist.c +++ b/gtkplaylist.c @@ -361,6 +361,9 @@ gtkpl_draw_pl_row (gtkplaylist_t *ps, int row, playItem_t *it) { void gtkpl_draw_playlist (gtkplaylist_t *ps, int x, int y, int w, int h) { GtkWidget *widget = ps->playlist; + if (!ps->backbuf) { + return; + } if (!ps->fmtcache && ps->nvisiblerows > 0 && pl_ncolumns > 0) { ps->fmtcache = malloc (ps->nvisiblerows * pl_ncolumns * 3 * sizeof (int16_t)); memset (ps->fmtcache, 0, ps->nvisiblerows * pl_ncolumns * 3 * sizeof (int16_t)); @@ -427,7 +430,9 @@ on_playlist_configure_event (GtkWidget *widget, void gtkpl_expose (gtkplaylist_t *ps, int x, int y, int w, int h) { GtkWidget *widget = ps->playlist; - gdk_draw_drawable (widget->window, widget->style->black_gc, ps->backbuf, x, y, x, y, w, h); + if (widget->window) { + gdk_draw_drawable (widget->window, widget->style->black_gc, ps->backbuf, x, y, x, y, w, h); + } } void |