Commits

jjacky committed 88ae570

Fix crash on manual checks when no upgrades, introduced by re-show last notifs feature

Also, re-show isn't available from menu when no last notifs are available, but can be triggered through single/double click; In which case, we now show a notif "no notifs to show"

Comments (0)

Files changed (3)

     void *pkg;
     kalu_package_t *kpkg;
     
-    debug ("looking for AUR updates");
+    debug ((is_watched) ? "looking for Watched AUR updates" : "looking for AUR updates");
     
     /* print start of url */
     max = MAX_URL_LENGTH;
 {
     alpm_list_t *i;
     
+    if (!config->last_notifs)
+    {
+        notif_t notif;
+        
+        notif.type = 0;
+        notif.summary = "No notifications to show.";
+        notif.text = NULL;
+        notif.data = NULL;
+        
+        show_notif (&notif);
+        return;
+    }
+    
     for (i = config->last_notifs; i; i = alpm_list_next (i))
     {
         show_notif ((notif_t *) i->data);
     notif = malloc (sizeof (*notif));
     notif->type = 0;
     notif->summary = strdup (summary);
-    notif->text = strdup (text);
+    notif->text = (text) ? strdup (text) : NULL;
     notif->data = NULL;
     
     /* add the notif to the last of last notifications, so we can re-show it later */
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.