summaryrefslogtreecommitdiff
path: root/editors/abiword/patches/patch-plugins_paint_xp_AbiGeneric.cpp
blob: 5148dfc55c573c8a9db5bbcdf88d01d4328acf3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-plugins_paint_xp_AbiGeneric.cpp,v 1.1 2015/09/13 21:32:13 nros Exp $
If pFrame is NULL an image is obviously not selected.
Fixes seg fault.
--- plugins/paint/xp/AbiGeneric.cpp.orig	2013-04-07 13:53:03.000000000 +0000
+++ plugins/paint/xp/AbiGeneric.cpp
@@ -297,6 +297,9 @@ bool isImageSelected (void)
 {
 	// Get the current view that the user is in.
 	XAP_Frame *pFrame = XAP_App::getApp()->getLastFocussedFrame();
+	if (pFrame == NULL) {
+	  return false;
+	}
 	FV_View* pView = static_cast<FV_View*>(pFrame->getCurrentView());
 
     return (pView->getSelectedImage(NULL) != 0);