[dia] Fix crashing on DiaObject::get_object_menu() returning NULL
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Fix crashing on DiaObject::get_object_menu() returning NULL
- Date: Wed, 3 Oct 2012 20:03:16 +0000 (UTC)
commit aec5d45b0fe6382e11fc13ccf36d090da6d0a59c
Author: Hans Breuer <hans breuer org>
Date: Tue Oct 2 20:53:48 2012 +0200
Fix crashing on DiaObject::get_object_menu() returning NULL
app/disp_callbacks.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/disp_callbacks.c b/app/disp_callbacks.c
index ffea0f1..5021f47 100644
--- a/app/disp_callbacks.c
+++ b/app/disp_callbacks.c
@@ -290,7 +290,7 @@ popup_object_menu(DDisplay *ddisp, GdkEventButton *bevent)
num_items = 0;
} else {
dia_menu = (obj->ops->get_object_menu)(obj, &last_clicked_pos);
- num_items = dia_menu->num_items;
+ num_items = dia_menu ? dia_menu->num_items : 0;
}
if (dia_menu->app_data == NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]