[gnome-commander/gcmd-1-2-8] Safety precautions for g_mutex_lock() and g_mutex_unlock()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/gcmd-1-2-8] Safety precautions for g_mutex_lock() and g_mutex_unlock()
- Date: Fri, 8 Apr 2011 19:21:15 +0000 (UTC)
commit 8c285bb1231d7ebb991aab6d3840df08f2733c2b
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Fri Apr 8 21:16:57 2011 +0200
Safety precautions for g_mutex_lock() and g_mutex_unlock()
src/gnome-cmd-search-dialog.cc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-search-dialog.cc b/src/gnome-cmd-search-dialog.cc
index 7a5783e..0b5a565 100644
--- a/src/gnome-cmd-search-dialog.cc
+++ b/src/gnome-cmd-search-dialog.cc
@@ -377,7 +377,8 @@ static gpointer perform_search_operation (SearchData *data)
static gboolean update_search_status_widgets (SearchData *data)
{
- g_mutex_lock (data->pdata.mutex);
+ if (data->pdata.mutex)
+ g_mutex_lock (data->pdata.mutex);
// Add all files found since last update to the list
for (GList *files = data->pdata.files; files; files = files->next)
@@ -395,7 +396,8 @@ static gboolean update_search_status_widgets (SearchData *data)
// Update the progress bar
progress_bar_update (data->dialog->priv->pbar, PBAR_MAX);
- g_mutex_unlock (data->pdata.mutex);
+ if (data->pdata.mutex)
+ g_mutex_unlock (data->pdata.mutex);
if (data->search_done)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]