mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-27 06:07:59 +02:00
Fix further possible, and comment on definite null pointer derefs per cppcheck.
This commit is contained in:
parent
8cc8a275f8
commit
2278cdce95
@ -1043,14 +1043,14 @@ wxCursor & ThemeBase::Cursor( int iIndex )
|
|||||||
{
|
{
|
||||||
wxASSERT( iIndex >= 0 );
|
wxASSERT( iIndex >= 0 );
|
||||||
EnsureInitialised();
|
EnsureInitialised();
|
||||||
return *(wxCursor*)NULL;
|
return *(wxCursor*)NULL; // ANSWER-ME: Purposeful null deref?
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont & ThemeBase::Font( int iIndex )
|
wxFont & ThemeBase::Font( int iIndex )
|
||||||
{
|
{
|
||||||
wxASSERT( iIndex >= 0 );
|
wxASSERT( iIndex >= 0 );
|
||||||
EnsureInitialised();
|
EnsureInitialised();
|
||||||
return *(wxFont*)NULL;
|
return *(wxFont*)NULL; // ANSWER-ME: Purposeful null deref?
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Replaces both the image and the bitmap.
|
/// Replaces both the image and the bitmap.
|
||||||
|
@ -5838,18 +5838,20 @@ void TrackPanel::UpdateVRuler(Track *t)
|
|||||||
void TrackPanel::UpdateTrackVRuler(Track *t)
|
void TrackPanel::UpdateTrackVRuler(Track *t)
|
||||||
{
|
{
|
||||||
wxASSERT(t);
|
wxASSERT(t);
|
||||||
|
if (!t)
|
||||||
|
return;
|
||||||
|
|
||||||
wxRect r(GetVRulerOffset(),
|
wxRect r(GetVRulerOffset(),
|
||||||
kTopInset,
|
kTopInset,
|
||||||
GetVRulerWidth(),
|
GetVRulerWidth(),
|
||||||
t->GetHeight() - (kTopInset + 2));
|
t->GetHeight() - (kTopInset + 2));
|
||||||
|
|
||||||
if (t) {
|
mTrackArtist->UpdateVRuler(t, r);
|
||||||
mTrackArtist->UpdateVRuler(t, r);
|
Track *l = t->GetLink();
|
||||||
Track *l = t->GetLink();
|
if (l)
|
||||||
if (l) {
|
{
|
||||||
r.height = l->GetHeight() - (kTopInset + 2);
|
r.height = l->GetHeight() - (kTopInset + 2);
|
||||||
mTrackArtist->UpdateVRuler(l, r);
|
mTrackArtist->UpdateVRuler(l, r);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user