~docky-core/plank/keybindings

« back to all changes in this revision

Viewing changes to lib/DockRenderer.vala

  • Committer: Rico Tzschichholz
  • Date: 2015-09-03 19:42:46 UTC
  • Revision ID: ricotz@ubuntu.com-20150903194246-kmmuhkkgypcno23u
dockrenderer: Guard against empty dock (which ideally won't happen)

Show diffs side-by-side

added added

removed removed

Lines of Context:
239
239
                {
240
240
                        return_if_fail (theme != null);
241
241
                        
 
242
                        unowned Gee.ArrayList<unowned DockItem> new_items = controller.VisibleItems;
 
243
                        
 
244
                        // FIXME This should never happen
 
245
                        if (new_items.size <= 0) {
 
246
                                critical ("No items available to initialize frame");
 
247
                                return;
 
248
                        }
 
249
                        
242
250
                        unowned PositionManager position_manager = controller.position_manager;
243
251
                        
244
252
                        screen_is_composited = position_manager.screen_is_composited;
281
289
                        
282
290
                        // Update *ordered* list of items
283
291
                        current_items.clear ();
284
 
                        current_items.add_all (controller.VisibleItems);
 
292
                        current_items.add_all (new_items);
285
293
                        
286
294
                        if (screen_is_composited) {
287
295
                                var add_time = 0LL;
336
344
                 */
337
345
                public override void draw (Cairo.Context cr, int64 frame_time)
338
346
                {
 
347
                        // FIXME This should never happen
 
348
                        if (current_items.size <= 0) {
 
349
                                critical ("No items available to draw frame");
 
350
                                return;
 
351
                        }
 
352
                        
339
353
#if HAVE_HIDPI
340
354
                        window_scale_factor = controller.window.get_window ().get_scale_factor ();
341
355
#endif