comparison gui/mplayer/gtk/sb.c @ 32537:8fa2f43cb760

Remove most of the NULL pointer check before free all over the code
author cboesch
date Sun, 14 Nov 2010 09:12:34 +0000
parents 016e5fc1dead
children 12ae3b893c59
comparison
equal deleted inserted replaced
32536:187f26cba0ce 32537:8fa2f43cb760
100 case 0: // cancel 100 case 0: // cancel
101 if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) ChangeSkin( gtkOldSkin ); 101 if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) ChangeSkin( gtkOldSkin );
102 break; 102 break;
103 case 1: // ok 103 case 1: // ok
104 ChangeSkin( sbSelectedSkin ); 104 ChangeSkin( sbSelectedSkin );
105 if ( skinName ) free( skinName ); 105 free( skinName );
106 skinName=strdup( sbSelectedSkin ); 106 skinName=strdup( sbSelectedSkin );
107 break; 107 break;
108 } 108 }
109 } 109 }
110 HideSkinBrowser(); 110 HideSkinBrowser();
120 gtkActive( SkinBrowser ); 120 gtkActive( SkinBrowser );
121 } 121 }
122 if( !bevent ) return; 122 if( !bevent ) return;
123 if( bevent->type == GDK_2BUTTON_PRESS ) 123 if( bevent->type == GDK_2BUTTON_PRESS )
124 { 124 {
125 if ( skinName ) free( skinName ); 125 free( skinName );
126 skinName=strdup( sbSelectedSkin ); 126 skinName=strdup( sbSelectedSkin );
127 HideSkinBrowser(); 127 HideSkinBrowser();
128 } 128 }
129 } 129 }
130 130