mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
[Modules] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable
This commit is contained in:
@@ -2407,7 +2407,7 @@ void DisplayServerWindows::set_native_icon(const String &p_filename) {
|
||||
f->seek(pos);
|
||||
f->get_buffer((uint8_t *)&data_big.write[0], bytecount_big);
|
||||
HICON icon_big = CreateIconFromResource((PBYTE)&data_big.write[0], bytecount_big, TRUE, 0x00030000);
|
||||
ERR_FAIL_COND_MSG(!icon_big, "Could not create " + itos(big_icon_width) + "x" + itos(big_icon_width) + " @" + itos(big_icon_cc) + " icon, error: " + format_error_message(GetLastError()) + ".");
|
||||
ERR_FAIL_NULL_MSG(icon_big, "Could not create " + itos(big_icon_width) + "x" + itos(big_icon_width) + " @" + itos(big_icon_cc) + " icon, error: " + format_error_message(GetLastError()) + ".");
|
||||
|
||||
// Read the small icon.
|
||||
DWORD bytecount_small = icon_dir->idEntries[small_icon_index].dwBytesInRes;
|
||||
@@ -2417,7 +2417,7 @@ void DisplayServerWindows::set_native_icon(const String &p_filename) {
|
||||
f->seek(pos);
|
||||
f->get_buffer((uint8_t *)&data_small.write[0], bytecount_small);
|
||||
HICON icon_small = CreateIconFromResource((PBYTE)&data_small.write[0], bytecount_small, TRUE, 0x00030000);
|
||||
ERR_FAIL_COND_MSG(!icon_small, "Could not create 16x16 @" + itos(small_icon_cc) + " icon, error: " + format_error_message(GetLastError()) + ".");
|
||||
ERR_FAIL_NULL_MSG(icon_small, "Could not create 16x16 @" + itos(small_icon_cc) + " icon, error: " + format_error_message(GetLastError()) + ".");
|
||||
|
||||
// Online tradition says to be sure last error is cleared and set the small icon first.
|
||||
int err = 0;
|
||||
|
||||
Reference in New Issue
Block a user