1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-24 16:20:05 +02:00

Fix further possible, and comment on definite null pointer derefs per cppcheck.

This commit is contained in:
v.audacity 2011-11-20 07:09:46 +00:00
parent 8cc8a275f8
commit 2278cdce95
2 changed files with 11 additions and 9 deletions

View File

@ -1043,14 +1043,14 @@ wxCursor & ThemeBase::Cursor( int iIndex )
{
wxASSERT( iIndex >= 0 );
EnsureInitialised();
return *(wxCursor*)NULL;
return *(wxCursor*)NULL; // ANSWER-ME: Purposeful null deref?
}
wxFont & ThemeBase::Font( int iIndex )
{
wxASSERT( iIndex >= 0 );
EnsureInitialised();
return *(wxFont*)NULL;
return *(wxFont*)NULL; // ANSWER-ME: Purposeful null deref?
}
/// Replaces both the image and the bitmap.

View File

@ -5838,19 +5838,21 @@ void TrackPanel::UpdateVRuler(Track *t)
void TrackPanel::UpdateTrackVRuler(Track *t)
{
wxASSERT(t);
if (!t)
return;
wxRect r(GetVRulerOffset(),
kTopInset,
GetVRulerWidth(),
t->GetHeight() - (kTopInset + 2));
if (t) {
mTrackArtist->UpdateVRuler(t, r);
Track *l = t->GetLink();
if (l) {
if (l)
{
r.height = l->GetHeight() - (kTopInset + 2);
mTrackArtist->UpdateVRuler(l, r);
}
}
}
void TrackPanel::UpdateVRulerSize()