summaryrefslogtreecommitdiff
path: root/libopie2/opieui/big-screen
authorerik <erik>2007-01-24 19:54:07 (UTC)
committer erik <erik>2007-01-24 19:54:07 (UTC)
commit89e81059e832ff77c2f0ac8b9db12f80eafa03fc (patch) (unidiff)
tree99a130fc643d2aeefdecab452f644e7b61a5f50e /libopie2/opieui/big-screen
parent035bbc5bf689839c8d8e7be37f347b0dd900fccf (diff)
downloadopie-89e81059e832ff77c2f0ac8b9db12f80eafa03fc.zip
opie-89e81059e832ff77c2f0ac8b9db12f80eafa03fc.tar.gz
opie-89e81059e832ff77c2f0ac8b9db12f80eafa03fc.tar.bz2
Each file in this commit has an instance where a pointer is checked at
one point in the code and then not checked in another point in the code. If it needed to be checked once, it needs to be checked the other time. If not the application could segfault.
Diffstat (limited to 'libopie2/opieui/big-screen') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/osplitter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opieui/big-screen/osplitter.cpp b/libopie2/opieui/big-screen/osplitter.cpp
index 78e919a..5d1e2cf 100644
--- a/libopie2/opieui/big-screen/osplitter.cpp
+++ b/libopie2/opieui/big-screen/osplitter.cpp
@@ -206,49 +206,49 @@ void OSplitter::removeWidget( OSplitter* split)
206 * @param label The label of the possible Tab 206 * @param label The label of the possible Tab
207 */ 207 */
208void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& label ) 208void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& label )
209{ 209{
210#ifdef DEBUG 210#ifdef DEBUG
211 if (!wid ) 211 if (!wid )
212 return; 212 return;
213#endif 213#endif
214 OSplitterContainer cont; 214 OSplitterContainer cont;
215 cont.widget = wid; 215 cont.widget = wid;
216 cont.icon =icon; 216 cont.icon =icon;
217 cont.name = label; 217 cont.name = label;
218 218
219 m_container.append( cont ); 219 m_container.append( cont );
220 220
221 /* 221 /*
222 * 222 *
223 */ 223 */
224 if (!m_splitter.isEmpty() && (m_tabWidget || m_parentTab ) ) 224 if (!m_splitter.isEmpty() && (m_tabWidget || m_parentTab ) )
225 setTabWidget( m_parentTab ); 225 setTabWidget( m_parentTab );
226 else 226 else
227 { 227 {
228 if (m_hbox ) 228 if (m_hbox )
229 addToBox( cont ); 229 addToBox( cont );
230 else 230 else if (m_tabWidget)
231 addToTab( cont ); 231 addToTab( cont );
232 } 232 }
233} 233}
234 234
235 235
236/** 236/**
237 * Removes the widget from the tab widgets if necessary. 237 * Removes the widget from the tab widgets if necessary.
238 * OSplitter drops ownership of this widget and the widget 238 * OSplitter drops ownership of this widget and the widget
239 * will be reparented i tto 0. 239 * will be reparented i tto 0.
240 * The widget will not be deleted. 240 * The widget will not be deleted.
241 * 241 *
242 * @param w The widget to be removed 242 * @param w The widget to be removed
243 */ 243 */
244void OSplitter::removeWidget( QWidget* w) 244void OSplitter::removeWidget( QWidget* w)
245{ 245{
246 ContainerList::Iterator it; 246 ContainerList::Iterator it;
247 for ( it = m_container.begin(); it != m_container.end(); ++it ) 247 for ( it = m_container.begin(); it != m_container.end(); ++it )
248 if ( (*it).widget == w ) 248 if ( (*it).widget == w )
249 break; 249 break;
250 250
251 if (it == m_container.end() ) 251 if (it == m_container.end() )
252 return; 252 return;
253 253
254 254