summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/analysis/loaded.c12
-rw-r--r--src/format/format.c8
-rw-r--r--src/gtkext/gtkdisplaypanel-int.h3
-rw-r--r--src/gtkext/gtkdisplaypanel.h5
4 files changed, 20 insertions, 8 deletions
diff --git a/src/analysis/loaded.c b/src/analysis/loaded.c
index e65cb38..5359103 100644
--- a/src/analysis/loaded.c
+++ b/src/analysis/loaded.c
@@ -168,7 +168,11 @@ bool g_loaded_content_restore(GLoadedContent *content, xmlDocPtr xdoc, xmlXPathC
iface = G_LOADED_CONTENT_GET_IFACE(content);
- result = iface->restore(content, xdoc, context, path);
+ if (iface->restore != NULL)
+ result = iface->restore(content, xdoc, context, path);
+
+ else
+ result = true;
return result;
@@ -197,7 +201,11 @@ bool g_loaded_content_save(const GLoadedContent *content, xmlDocPtr xdoc, xmlXPa
iface = G_LOADED_CONTENT_GET_IFACE(content);
- result = iface->save(content, xdoc, context, path);
+ if (iface->save != NULL)
+ result = iface->save(content, xdoc, context, path);
+
+ else
+ result = true;
return result;
diff --git a/src/format/format.c b/src/format/format.c
index 5ff08e6..2101767 100644
--- a/src/format/format.c
+++ b/src/format/format.c
@@ -251,9 +251,13 @@ void g_binary_format_set_content(GBinFormat *format, GBinContent *content)
GBinContent *g_binary_format_get_content(const GBinFormat *format)
{
- g_object_ref(G_OBJECT(format->content));
+ GBinContent *result; /* Instance à retourner */
- return format->content;
+ result = format->content;
+
+ g_object_ref(G_OBJECT(result));
+
+ return result;
}
diff --git a/src/gtkext/gtkdisplaypanel-int.h b/src/gtkext/gtkdisplaypanel-int.h
index cf0335a..ffed3b1 100644
--- a/src/gtkext/gtkdisplaypanel-int.h
+++ b/src/gtkext/gtkdisplaypanel-int.h
@@ -32,7 +32,8 @@
#include <gtk/gtk.h>
-#include "../glibext/glinecursor.h"
+#include "../analysis/binary.h"
+#include "../glibext/gloadedpanel.h"
diff --git a/src/gtkext/gtkdisplaypanel.h b/src/gtkext/gtkdisplaypanel.h
index b336799..51648df 100644
--- a/src/gtkext/gtkdisplaypanel.h
+++ b/src/gtkext/gtkdisplaypanel.h
@@ -26,11 +26,10 @@
#include <glib-object.h>
+#include <stdbool.h>
-#include "../analysis/binary.h"
-#include "../glibext/glinecursor.h"
-#include "../glibext/gloadedpanel.h"
+#include "../arch/vmpa.h"