summaryrefslogtreecommitdiff
path: root/noncore/settings
authorerik <erik>2007-02-08 01:45:16 (UTC)
committer erik <erik>2007-02-08 01:45:16 (UTC)
commit2e497f7cae45184184e2416114887095735958f5 (patch) (unidiff)
treea6b399d9bce5854dc7ad6c985b48965cf20680b0 /noncore/settings
parent853b61f97e718359bef95147ab3c7beb0705acda (diff)
downloadopie-2e497f7cae45184184e2416114887095735958f5.zip
opie-2e497f7cae45184184e2416114887095735958f5.tar.gz
opie-2e497f7cae45184184e2416114887095735958f5.tar.bz2
Each file in this commit has a problem where it is possible to dereference
a pointer without that pointer being valid. This commit fixes each instance of that.
Diffstat (limited to 'noncore/settings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp3
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp6
2 files changed, 7 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp b/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp
index 9069c09..3fd877f 100644
--- a/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.cpp
@@ -295,6 +295,9 @@ UUIDVector OTSDPAttribute::getAllUUIDs() {
295 subAttributes = getAlternative(); 295 subAttributes = getAlternative();
296 } 296 }
297 297
298 if (!subAttributes)
299 return 0;
300
298 int os; 301 int os;
299 for( unsigned int i = 0; i < subAttributes->count(); i++ ) { 302 for( unsigned int i = 0; i < subAttributes->count(); i++ ) {
300 UUIDVector subUUIDs = (*subAttributes)[i]->getAllUUIDs(); 303 UUIDVector subUUIDs = (*subAttributes)[i]->getAllUUIDs();
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
index d014378..78a18f7 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
@@ -436,7 +436,9 @@ void OIpkgConfigDlg::initData()
436 } 436 }
437 437
438 // Get Ipkg execution options 438 // Get Ipkg execution options
439 int options = m_ipkg->ipkgExecOptions(); 439 int options = 0;
440 if ( m_ipkg )
441 options = m_ipkg->ipkgExecOptions();
440 if ( options & FORCE_DEPENDS ) 442 if ( options & FORCE_DEPENDS )
441 m_optForceDepends->setChecked( true ); 443 m_optForceDepends->setChecked( true );
442 if ( options & FORCE_REINSTALL ) 444 if ( options & FORCE_REINSTALL )
@@ -450,7 +452,7 @@ void OIpkgConfigDlg::initData()
450 if ( options & FORCE_VERBOSE_WGET ) 452 if ( options & FORCE_VERBOSE_WGET )
451 m_optVerboseWget->setChecked( true ); 453 m_optVerboseWget->setChecked( true );
452 454
453 m_optVerboseIpkg->setCurrentItem( m_ipkg->ipkgExecVerbosity() ); 455 m_optVerboseIpkg->setCurrentItem( ( m_ipkg ? m_ipkg->ipkgExecVerbosity() : 0 ) );
454} 456}
455 457
456void OIpkgConfigDlg::slotServerSelected( int index ) 458void OIpkgConfigDlg::slotServerSelected( int index )