Answered question about returning NULL pointer.

This commit is contained in:
james.k.crook@gmail.com 2011-11-24 19:34:45 +00:00
parent 3bcb940843
commit 0f81cf83a8
1 changed files with 10 additions and 2 deletions

View File

@ -1039,19 +1039,27 @@ wxSize ThemeBase::ImageSize( int iIndex )
wxImage & Image = mImages[iIndex];
return wxSize( Image.GetWidth(), Image.GetHeight());
}
// The next two functions are for future use.
#if 0
wxCursor & ThemeBase::Cursor( int iIndex )
{
wxASSERT( iIndex >= 0 );
EnsureInitialised();
return *(wxCursor*)NULL; // ANSWER-ME: Purposeful null deref?
// Purposeful null deref. Function is for future use.
// If anyone tries to use it now they will get an error.
return *(wxCursor*)NULL;
}
wxFont & ThemeBase::Font( int iIndex )
{
wxASSERT( iIndex >= 0 );
EnsureInitialised();
return *(wxFont*)NULL; // ANSWER-ME: Purposeful null deref?
// Purposeful null deref. Function is for future use.
// If anyone tries to use it now they will get an error.
return *(wxFont*)NULL;
}
#endif
/// Replaces both the image and the bitmap.
void ThemeBase::ReplaceImage( int iIndex, wxImage * pImage )