mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 05:26:13 +01:00
Assert string arguments are not null
For these functions, providing a null pointer argument would result in invoking undefined behavior.
This commit is contained in:
1 parent
21d4571d5b
commit
d26c691458
3 files changed
+3
No files matched your search
@@ -81,6 +81,7 @@ const sfSoundBuffer* sfSoundBufferRecorder_getBuffer(const sfSoundBufferRecorder
|
||||
bool sfSoundBufferRecorder_setDevice(sfSoundBufferRecorder* soundBufferRecorder, const char* name)
|
||||
{
|
||||
assert(soundBufferRecorder);
|
||||
assert(name);
|
||||
return soundBufferRecorder->This.setDevice(name);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ const char* sfSoundRecorder_getDefaultDevice()
|
||||
bool sfSoundRecorder_setDevice(sfSoundRecorder* soundRecorder, const char* name)
|
||||
{
|
||||
assert(soundRecorder);
|
||||
assert(name);
|
||||
return soundRecorder->This.setDevice(name);
|
||||
}
|
||||
|
||||
|
||||
@@ -122,6 +122,7 @@ bool sfImage_saveToMemory(const sfImage* image, sfBuffer* output, const char* fo
|
||||
{
|
||||
assert(image);
|
||||
assert(output);
|
||||
assert(format);
|
||||
|
||||
auto data = image->This.saveToMemory(format);
|
||||
|
||||
|
||||
Reference in new issue
Block a user