Don't crash if no audio file for Phonon is set
[quassel.git] / src / qtui / phononnotificationbackend.cpp
index bcc7c76..8bd7020 100644 (file)
@@ -20,8 +20,8 @@
 
 #include <QFileDialog>
 
-#include <Phonon/MediaObject>
-#include <Phonon/BackendCapabilities>
+#include <phonon/mediaobject.h>
+#include <phonon/backendcapabilities.h>
 
 #include "phononnotificationbackend.h"
 
@@ -54,7 +54,7 @@ PhononNotificationBackend::~PhononNotificationBackend()
 void PhononNotificationBackend::notify(const Notification &notification)
 {
     if (_enabled && (notification.type == Highlight || notification.type == PrivMsg)) {
-        if (_audioAvailable) {
+        if (_audioAvailable && _media) {
             _media->stop();
             _media->play();
         }