OSReceiveMessage hook: Only look into the message if the result is true

This commit is contained in:
Maschell 2020-05-28 20:51:56 +02:00
parent 7a7a1f7a63
commit 9ee8085a64

View File

@ -260,7 +260,7 @@ DECL(uint32_t, OSReceiveMessage, OSMessageQueue *queue, OSMessage *message, uint
}
int32_t res = real_OSReceiveMessage(queue, message, flags);
if (queue == OSGetSystemMessageQueue()) {
if (message != NULL) {
if (message != NULL && res) {
if (lastData0 != message->args[0]) {
if (message->args[0] == 0xFACEF000) {
CallHook(gPluginInformation, WUPS_LOADER_HOOK_ACQUIRED_FOREGROUND);