# HG changeset patch # User mf0102 <0102@gmx.at> # Date 1206464021 -3600 # Node ID 99b6e2bac92a8823c2e97bbedd469c3a64c5ed91 # Parent 1f900d7b737b45c06a35ffca2dd90fa8a355dc66 write window positions to config only when windows are valid diff -r 1f900d7b737b -r 99b6e2bac92a src/audacious/bmpconfig.c --- a/src/audacious/bmpconfig.c Tue Mar 25 17:46:06 2008 +0100 +++ b/src/audacious/bmpconfig.c Tue Mar 25 17:53:41 2008 +0100 @@ -635,7 +635,8 @@ /* FIXME: we're looking up SkinnedWindow::x &c ourselves here. * this isn't exactly right. -nenolod */ - if ( SKINNED_WINDOW(playlistwin)->x != -1 && + if ( playlistwin && + SKINNED_WINDOW(playlistwin)->x != -1 && SKINNED_WINDOW(playlistwin)->y != -1 ) { cfg_db_set_int(db, NULL, "playlist_x", @@ -644,7 +645,8 @@ SKINNED_WINDOW(playlistwin)->y); } - if ( SKINNED_WINDOW(mainwin)->x != -1 && + if ( mainwin && + SKINNED_WINDOW(mainwin)->x != -1 && SKINNED_WINDOW(mainwin)->y != -1 ) { cfg_db_set_int(db, NULL, "player_x", @@ -653,7 +655,8 @@ SKINNED_WINDOW(mainwin)->y); } - if ( SKINNED_WINDOW(equalizerwin)->x != -1 && + if ( equalizerwin && + SKINNED_WINDOW(equalizerwin)->x != -1 && SKINNED_WINDOW(equalizerwin)->y != -1 ) { cfg_db_set_int(db, NULL, "equalizer_x",