X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2FguiEvents.c;h=89c36e5444f6eb87c7a51f4ba32a54c0a0b505cf;hb=f9334f6f7ef5e0b29fdc66d36d39ca164dfc27e5;hp=27230d11e0c4c5c6f80eeb7b472929242c45c250;hpb=f2f6d4989f6e28692e984e4948a1db4c1b15c971;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/guiEvents.c b/ltt/branches/poly/lttv/modules/guiEvents.c index 27230d11..89c36e54 100644 --- a/ltt/branches/poly/lttv/modules/guiEvents.c +++ b/ltt/branches/poly/lttv/modules/guiEvents.c @@ -230,7 +230,9 @@ hGuiEvents(mainWindow * pmParentWindow) { EventViewerData* Event_Viewer_Data = GuiEvents(pmParentWindow) ; - return Event_Viewer_Data->HBox_V ; + if(Event_Viewer_Data) + return Event_Viewer_Data->HBox_V ; + else return NULL; } @@ -424,6 +426,8 @@ GuiEvents(mainWindow *pmParentWindow) Event_Viewer_Data->raw_trace_data = Event_Viewer_Data->raw_trace_data_first; get_events(Event_Viewer_Data, start,end, RESERVE_SIZE); Event_Viewer_Data->Number_Of_Events = Event_Viewer_Data->raw_trace_data->len; + + if(Event_Viewer_Data->raw_trace_data->len == 0) return NULL; time_period = g_new(TimePeriod, 1); data = g_ptr_array_index(Event_Viewer_Data->raw_trace_data,0);