Fix crash on first startup of Daemon (?)

This commit is contained in:
Jaidyn Ann 2021-10-11 12:42:13 -05:00
parent 492ebaa2e4
commit 1d8433f598
5 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,6 @@
#include "FeedsView.h" #include "FeedsView.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "Mimetypes.h" #include "Mimetypes.h"
#include "Notifier.h"
#include "Preferences.h" #include "Preferences.h"
#include "SourceManager.h" #include "SourceManager.h"
#include "Util.h" #include "Util.h"

View File

@ -13,7 +13,6 @@ class BMessage;
class BMessageRunner; class BMessageRunner;
class FeedController; class FeedController;
class MainWindow; class MainWindow;
class Notifier;
class App : public BApplication class App : public BApplication

View File

@ -22,7 +22,6 @@
#include "FeedEditWindow.h" #include "FeedEditWindow.h"
#include "FeedListItem.h" #include "FeedListItem.h"
#include "FeedListView.h" #include "FeedListView.h"
#include "Notifier.h"
#include "SourceListItem.h" #include "SourceListItem.h"
#include "SourceManager.h" #include "SourceManager.h"

View File

@ -19,7 +19,6 @@
#include "FeedController.h" #include "FeedController.h"
#include "FeedListView.h" #include "FeedListView.h"
#include "FeedsView.h" #include "FeedsView.h"
#include "Notifier.h"
#include "UpdatesView.h" #include "UpdatesView.h"

View File

@ -11,8 +11,9 @@
#include <StringFormat.h> #include <StringFormat.h>
#include <Notification.h> #include <Notification.h>
#include "App.h" #include "Daemon.h"
#include "FeedController.h" #include "FeedController.h"
#include "Preferences.h"
#undef B_TRANSLATION_CONTEXT #undef B_TRANSLATION_CONTEXT
@ -128,8 +129,11 @@ Notifier::_SendUpdatedNotification()
notifyNew.SetContent(notifyText); notifyNew.SetContent(notifyText);
entry_ref feedsRef; entry_ref feedsRef;
BEntry(((App*)be_app)->fPreferences->EntryDir()).GetRef(&feedsRef); const char* entryDir = ((App*)be_app)->fPreferences->EntryDir();
notifyNew.SetOnClickFile(&feedsRef); if (entryDir != NULL) {
BEntry(entryDir).GetRef(&feedsRef);
notifyNew.SetOnClickFile(&feedsRef);
}
notifyNew.Send(); notifyNew.Send();
} }