| Index: src/FilterEngine.cpp |
| diff --git a/src/FilterEngine.cpp b/src/FilterEngine.cpp |
| index 96c4571fbf593f47041bd3415fc44d73f55da7f1..9448abeb10adf2a4856dcbd0dcb701c96dc5d47a 100644 |
| --- a/src/FilterEngine.cpp |
| +++ b/src/FilterEngine.cpp |
| @@ -265,7 +265,12 @@ NotificationPtr FilterEngine::GetNextNotificationToShow(const std::string& url) |
| { |
| params.push_back(jsEngine->NewValue(url)); |
| } |
| - return Notification::JsValueToNotification(func->Call(params)); |
| + JsValuePtr jsNotification = func->Call(params); |
| + if (!jsNotification->IsObject()) |
| + { |
| + return NotificationPtr(); |
| + } |
| + return NotificationPtr(new Notification(jsNotification)); |
| } |
| AdblockPlus::FilterPtr FilterEngine::Matches(const std::string& url, |