# HG changeset patch # User Tomasz Mon # Date 1198596514 -3600 # Node ID 1112f53ecc18cd24f16516e660e135fd3806cde2 # Parent a5779105e6d2b18ed72e52d9e856e03bb97d5e04 prevent BadAlloc's diff -r a5779105e6d2 -r 1112f53ecc18 src/audacious/ui_skinned_button.c --- a/src/audacious/ui_skinned_button.c Tue Dec 25 16:03:27 2007 +0100 +++ b/src/audacious/ui_skinned_button.c Tue Dec 25 16:28:34 2007 +0100 @@ -290,6 +290,7 @@ UiSkinnedButton *button = UI_SKINNED_BUTTON (widget); UiSkinnedButtonPrivate *priv = UI_SKINNED_BUTTON_GET_PRIVATE (button); + g_return_val_if_fail (priv->w > 0 || priv->h > 0, FALSE); //TYPE_SMALL doesn't have its own face if (button->type == TYPE_SMALL || button->type == TYPE_NOT_SET) diff -r a5779105e6d2 -r 1112f53ecc18 src/audacious/ui_skinned_equalizer_graph.c --- a/src/audacious/ui_skinned_equalizer_graph.c Tue Dec 25 16:03:27 2007 +0100 +++ b/src/audacious/ui_skinned_equalizer_graph.c Tue Dec 25 16:28:34 2007 +0100 @@ -226,6 +226,7 @@ g_return_val_if_fail (event != NULL, FALSE); UiSkinnedEqualizerGraph *equalizer_graph = UI_SKINNED_EQUALIZER_GRAPH (widget); + g_return_val_if_fail (equalizer_graph->width > 0 || equalizer_graph->height > 0, FALSE); GdkPixmap *obj = NULL; GdkGC *gc; diff -r a5779105e6d2 -r 1112f53ecc18 src/audacious/ui_skinned_equalizer_slider.c --- a/src/audacious/ui_skinned_equalizer_slider.c Tue Dec 25 16:03:27 2007 +0100 +++ b/src/audacious/ui_skinned_equalizer_slider.c Tue Dec 25 16:28:34 2007 +0100 @@ -204,6 +204,7 @@ UiSkinnedEqualizerSlider *es = UI_SKINNED_EQUALIZER_SLIDER (widget); UiSkinnedEqualizerSliderPrivate *priv = UI_SKINNED_EQUALIZER_SLIDER_GET_PRIVATE(es); + g_return_val_if_fail (priv->width > 0 || priv->height > 0, FALSE); GdkPixmap *obj = NULL; GdkGC *gc; diff -r a5779105e6d2 -r 1112f53ecc18 src/audacious/ui_skinned_horizontal_slider.c --- a/src/audacious/ui_skinned_horizontal_slider.c Tue Dec 25 16:03:27 2007 +0100 +++ b/src/audacious/ui_skinned_horizontal_slider.c Tue Dec 25 16:28:34 2007 +0100 @@ -237,6 +237,7 @@ UiSkinnedHorizontalSlider *hs = UI_SKINNED_HORIZONTAL_SLIDER (widget); UiSkinnedHorizontalSliderPrivate *priv = UI_SKINNED_HORIZONTAL_SLIDER_GET_PRIVATE(hs); + g_return_val_if_fail (priv->width > 0 || priv->height > 0, FALSE); GdkPixmap *obj = NULL; GdkGC *gc; diff -r a5779105e6d2 -r 1112f53ecc18 src/audacious/ui_skinned_menurow.c --- a/src/audacious/ui_skinned_menurow.c Tue Dec 25 16:03:27 2007 +0100 +++ b/src/audacious/ui_skinned_menurow.c Tue Dec 25 16:28:34 2007 +0100 @@ -209,6 +209,7 @@ g_return_val_if_fail (event != NULL, FALSE); UiSkinnedMenurow *menurow = UI_SKINNED_MENUROW (widget); + g_return_val_if_fail (menurow->width > 0 || menurow->height > 0, FALSE); GdkPixmap *obj = NULL; GdkGC *gc; diff -r a5779105e6d2 -r 1112f53ecc18 src/audacious/ui_skinned_monostereo.c --- a/src/audacious/ui_skinned_monostereo.c Tue Dec 25 16:03:27 2007 +0100 +++ b/src/audacious/ui_skinned_monostereo.c Tue Dec 25 16:28:34 2007 +0100 @@ -177,6 +177,7 @@ g_return_val_if_fail (event != NULL, FALSE); UiSkinnedMonoStereo *monostereo = UI_SKINNED_MONOSTEREO (widget); + g_return_val_if_fail (monostereo->width > 0 || monostereo->height > 0, FALSE); GdkPixmap *obj = NULL; GdkGC *gc; diff -r a5779105e6d2 -r 1112f53ecc18 src/audacious/ui_skinned_number.c --- a/src/audacious/ui_skinned_number.c Tue Dec 25 16:03:27 2007 +0100 +++ b/src/audacious/ui_skinned_number.c Tue Dec 25 16:28:34 2007 +0100 @@ -183,6 +183,7 @@ g_return_val_if_fail (event != NULL, FALSE); UiSkinnedNumber *number = UI_SKINNED_NUMBER (widget); + g_return_val_if_fail (number->width > 0 || number->height > 0, FALSE); GdkPixmap *obj = NULL; GdkGC *gc; diff -r a5779105e6d2 -r 1112f53ecc18 src/audacious/ui_skinned_playlist.c --- a/src/audacious/ui_skinned_playlist.c Tue Dec 25 16:03:27 2007 +0100 +++ b/src/audacious/ui_skinned_playlist.c Tue Dec 25 16:28:34 2007 +0100 @@ -414,6 +414,7 @@ UiSkinnedPlaylist *pl = UI_SKINNED_PLAYLIST (widget); UiSkinnedPlaylistPrivate *priv = UI_SKINNED_PLAYLIST_GET_PRIVATE(pl); + g_return_val_if_fail (priv->width > 0 || priv->height > 0, FALSE); Playlist *playlist = playlist_get_active(); GList *list; diff -r a5779105e6d2 -r 1112f53ecc18 src/audacious/ui_skinned_playlist_slider.c --- a/src/audacious/ui_skinned_playlist_slider.c Tue Dec 25 16:03:27 2007 +0100 +++ b/src/audacious/ui_skinned_playlist_slider.c Tue Dec 25 16:28:34 2007 +0100 @@ -215,6 +215,7 @@ UiSkinnedPlaylistSlider *ps = UI_SKINNED_PLAYLIST_SLIDER (widget); UiSkinnedPlaylistSliderPrivate *priv = UI_SKINNED_PLAYLIST_SLIDER_GET_PRIVATE(ps); + g_return_val_if_fail (priv->width > 0 || priv->height > 0, FALSE); GdkPixmap *obj = NULL; GdkGC *gc; diff -r a5779105e6d2 -r 1112f53ecc18 src/audacious/ui_skinned_playstatus.c --- a/src/audacious/ui_skinned_playstatus.c Tue Dec 25 16:03:27 2007 +0100 +++ b/src/audacious/ui_skinned_playstatus.c Tue Dec 25 16:28:34 2007 +0100 @@ -179,6 +179,7 @@ g_return_val_if_fail (event != NULL, FALSE); UiSkinnedPlaystatus *playstatus = UI_SKINNED_PLAYSTATUS (widget); + g_return_val_if_fail (playstatus->width > 0 || playstatus->height > 0, FALSE); GdkPixmap *obj = NULL; GdkGC *gc; diff -r a5779105e6d2 -r 1112f53ecc18 src/audacious/ui_skinned_textbox.c --- a/src/audacious/ui_skinned_textbox.c Tue Dec 25 16:03:27 2007 +0100 +++ b/src/audacious/ui_skinned_textbox.c Tue Dec 25 16:28:34 2007 +0100 @@ -276,6 +276,7 @@ UiSkinnedTextbox *textbox = UI_SKINNED_TEXTBOX (widget); UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox); + g_return_val_if_fail (textbox->width > 0 || textbox->height > 0, FALSE); GdkPixmap *obj = NULL; GdkGC *gc; @@ -527,6 +528,7 @@ g_return_if_fail(textbox != NULL); g_return_if_fail(pixmaptext != NULL); + g_return_val_if_fail (textbox->height > 0, FALSE); UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox);