forked from nemomobile-ux/nemo-packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From ed793b0359ec1c7c2a53bf7f0d11c97cadf82d47 Mon Sep 17 00:00:00 2001 | ||
From: Sergey Chupligin <[email protected]> | ||
Date: Thu, 23 Mar 2023 11:46:00 +0300 | ||
Subject: [PATCH] ffmemless: Dont destroy empty table | ||
|
||
--- | ||
src/plugins/ffmemless/plugin.c | 8 ++++++-- | ||
1 file changed, 6 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/plugins/ffmemless/plugin.c b/src/plugins/ffmemless/plugin.c | ||
index bc9b70a..f143272 100644 | ||
--- a/src/plugins/ffmemless/plugin.c | ||
+++ b/src/plugins/ffmemless/plugin.c | ||
@@ -539,7 +539,9 @@ static int ffm_setup_effects(const NProplist *props, GHashTable *effects) | ||
|
||
return 0; | ||
ffm_eff_error1: | ||
- g_hash_table_destroy(ffm.effects); | ||
+ if(g_hash_table_size(ffm.effects) > 0) { | ||
+ g_hash_table_destroy(ffm.effects); | ||
+ } | ||
return -1; | ||
} | ||
|
||
@@ -605,7 +607,9 @@ static int ffm_play(struct ffm_effect_data *data, int play) | ||
static void ffm_sink_shutdown(NSinkInterface *iface) | ||
{ | ||
(void) iface; | ||
- g_hash_table_destroy(ffm.effects); | ||
+ if(g_hash_table_size(ffm.effects) > 0) { | ||
+ g_hash_table_destroy(ffm.effects); | ||
+ } | ||
ffm_close_device(ffm.dev_file); | ||
} | ||
|
||
-- | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters