libwhb: Don't add a LogHandler if it's already in the list. (#140)

This commit is contained in:
Maschell 2020-06-03 22:05:08 +02:00 committed by GitHub
parent 27fbfd55fb
commit aaa045af97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,9 @@ WHBAddLogHandler(LogHandlerFn fn)
int i;
for (i = 0; i < MAX_HANDLERS; ++i) {
if(sHandlers[i] == fn){
break;
}
if (!sHandlers[i]) {
sHandlers[i] = fn;
return TRUE;