more checks before accessing icon - fixes crash when using ZynAddSubFX plugin

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1777 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-10-18 22:53:49 +00:00
parent 6008028852
commit 727584fc51
2 changed files with 7 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
2008-10-18 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/gui/widgets/track_label_button.cpp:
more checks before accessing icon - fixes crash when using ZynAddSubFX
plugin
* plugins/vst_base/remote_vst_plugin.cpp:
various tweakings

View File

@@ -126,7 +126,9 @@ void trackLabelButton::paintEvent( QPaintEvent * _pe )
dynamic_cast<instrumentTrack *>(
m_trackView->getTrack() );
const pixmapLoader * pl;
if( it && ( pl = it->getInstrument()->getDescriptor()->logo ) )
if( it && it->getInstrument() &&
it->getInstrument()->getDescriptor() &&
( pl = it->getInstrument()->getDescriptor()->logo ) )
{
if( pl->pixmapName() != m_iconName )
{