]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
aft: Honor AUDIO_FILE_REMOVE events.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 17 Apr 2018 08:05:07 +0000 (10:05 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 6 May 2018 08:45:39 +0000 (10:45 +0200)
If the current audio file has been removed, we should invalidate the
current_aft_row pointer.

aft.c

diff --git a/aft.c b/aft.c
index 2f972972fbfe432a777e0fc7d3e9dd1238eacbaf..5233fe962737b56f974c291bf1aba8677127a2b1 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -2581,6 +2581,10 @@ static int aft_event_handler(enum afs_events event, struct para_buffer *pb,
                        return ret;
                make_status_items();
                return 1;
+       } case AUDIO_FILE_REMOVE: {
+               if (data == current_aft_row)
+                       current_aft_row = NULL;
+               return 0;
        }
        case BLOB_RENAME:
        case BLOB_REMOVE: