Skip to content

Commit

Permalink
Merge pull request #13903 from fwcd/handle-notify-target-null
Browse files Browse the repository at this point in the history
MixxxApplication: Handle nullptr targets in notify
  • Loading branch information
daschuer authored Nov 19, 2024
2 parents 9a57502 + 18082d9 commit 6f94fd0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mixxxapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "soundio/soundmanagerutil.h"
#include "track/track.h"
#include "track/trackref.h"
#include "util/assert.h"
#include "util/cache.h"
#include "util/cmdlineargs.h"
#include "util/color/rgbcolor.h"
Expand Down Expand Up @@ -199,6 +200,11 @@ bool MixxxApplication::notify(QObject* pTarget, QEvent* pEvent) {

bool ret = QApplication::notify(pTarget, pEvent);

VERIFY_OR_DEBUG_ASSERT(pTarget != nullptr) {
qWarning() << "Processed" << pEvent->type() << "for null pointer, this is probably a bug!";
return ret;
}

if (m_isDeveloper &&
time.elapsed() > kEventNotifyExecTimeWarningThreshold) {
QDebug debug = qDebug();
Expand Down

0 comments on commit 6f94fd0

Please sign in to comment.